Socket
Socket
Sign inDemoInstall

wreck

Package Overview
Dependencies
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wreck - npm Package Compare versions

Comparing version 11.0.0 to 12.0.0

12

lib/index.js

@@ -218,6 +218,2 @@ 'use strict';

if (!err && res.statusCode >= 400) {
err = Boom.create(res.statusCode, res.statusMessage);
}
if (err) {

@@ -528,2 +524,10 @@ req.abort();

if (!err && res.statusCode >= 400) {
return callback(Boom.create(res.statusCode, 'Response Error: ' + res.statusMessage, {
isResponseError: true,
headers: res.headers,
payload
}));
}
return callback(err, res, payload);

@@ -530,0 +534,0 @@ });

{
"name": "wreck",
"description": "HTTP Client Utilities",
"version": "11.0.0",
"version": "12.0.0",
"repository": "git://github.com/hapijs/wreck",

@@ -6,0 +6,0 @@ "main": "lib/index",

@@ -122,3 +122,3 @@ ![wreck Logo](https://raw.github.com/hapijs/wreck/master/images/wreck.png)

- `callback` - The optional callback function using the signature `function (err, response)` where:
- `err` - Any error that may have occurred during the handling of the request or a Boom error object if the response has an error status code.
- `err` - Any error that may have occurred during the handling of the request.
- `response` - The [HTTP Incoming Message](http://nodejs.org/api/http.html#http_http_incomingmessage)

@@ -151,3 +151,6 @@ object, which is also a readable stream.

- `callback` - The callback function using the signature `function (err, response, payload)` where:
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code.
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code. If the error is a boom error object it will have the following properties in addition to the standard boom properties.
- `data.isResponseError` - boolean, indicates if the error is a result of an error response status code
- `data.headers` - object containing the response headers
- `data.payload` - the payload in the form of a Buffer or as a parsed object
- `response` - The [HTTP Incoming Message](http://nodejs.org/api/http.html#http_http_incomingmessage)

@@ -167,3 +170,6 @@ object, which is a readable stream that has "ended" and contains no more data to read.

- `callback` - The callback function using the signature `function (err, response, payload)` where:
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code.
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code. If the error is a boom error object it will have the following properties in addition to the standard boom properties.
- `data.isResponseError` - boolean, indicates if the error is a result of an error response status code
- `data.headers` - object containing the response headers
- `data.payload` - the payload in the form of a Buffer or as a parsed object
- `response` - The [HTTP Incoming Message](http://nodejs.org/api/http.html#http_http_incomingmessage)

@@ -182,3 +188,6 @@ object, which is a readable stream that has "ended" and contains no more data to read.

- `callback` - The callback function using the signature `function (err, response, payload)` where:
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code.
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code. If the error is a boom error object it will have the following properties in addition to the standard boom properties.
- `data.isResponseError` - boolean, indicates if the error is a result of an error response status code
- `data.headers` - object containing the response headers
- `data.payload` - the payload in the form of a Buffer or as a parsed object
- `response` - The [HTTP Incoming Message](http://nodejs.org/api/http.html#http_http_incomingmessage)

@@ -198,3 +207,6 @@ object, which is a readable stream that has "ended" and contains no more data to read.

- `callback` - The callback function using the signature `function (err, response, payload)` where:
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code.
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code. If the error is a boom error object it will have the following properties in addition to the standard boom properties.
- `data.isResponseError` - boolean, indicates if the error is a result of an error response status code
- `data.headers` - object containing the response headers
- `data.payload` - the payload in the form of a Buffer or as a parsed object
- `response` - The [HTTP Incoming Message](http://nodejs.org/api/http.html#http_http_incomingmessage)

@@ -214,3 +226,6 @@ object, which is a readable stream that has "ended" and contains no more data to read.

- `callback` - The callback function using the signature `function (err, response, payload)` where:
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code.
- `err` - Any error that may have occurred during handling of the request or a Boom error object if the response has an error status code. If the error is a boom error object it will have the following properties in addition to the standard boom properties.
- `data.isResponseError` - boolean, indicates if the error is a result of an error response status code
- `data.headers` - object containing the response headers
- `data.payload` - the payload in the form of a Buffer or as a parsed object
- `response` - The [HTTP Incoming Message](http://nodejs.org/api/http.html#http_http_incomingmessage)

@@ -217,0 +232,0 @@ object, which is a readable stream that has "ended" and contains no more data to read.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc