Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

Hapi Js wreck pomise and Interceptor for trace the request and response timetaken

License

Notifications You must be signed in to change notification settings

verkkokauppacom/wreck-promisify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

wreck-promisify

Wraps hapi wreck inside Bluebird promise and with interceptor for tracing the request and response.

Usage

import wreck from 'wreck-promisify'

wreck.get(url [, options]).then(response => {
	// ... handle response
})
wreck.put(url [, options]).then(response => {
	// ... handle response
})

wreck.post(url [, options]).then(response => {
	// ... handle response
})

wreck.delete(url [, options]).then(response => {
	// ... handle response
})

Options are passed to wreck as is. See Wreck documentation for more info.

Response interface

Response interface is an object with following fields:

  • body - Response body as a string
  • headers - Response headers
  • statusCode - Response status code
  • statusMessage - Response status message

About

Hapi Js wreck pomise and Interceptor for trace the request and response timetaken

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%