Socket
Socket
Sign inDemoInstall

wreck

Package Overview
Dependencies
2
Maintainers
4
Versions
50
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 12.1.0 to 12.2.0

5

lib/index.js

@@ -20,3 +20,3 @@ 'use strict';

const internals = {
jsonRegex: /^application\/[a-z.+-]*json$/,
jsonRegex: /^application\/([a-z0-9.]*[+-]json|json)$/,
shallowOptions: ['agent', 'agents', 'beforeRedirect', 'downstreamRes', 'payload', 'redirected'],

@@ -531,5 +531,6 @@ emitSymbol: Symbol.for('wreck')

if (!err && res.statusCode >= 400) {
return callback(Boom.create(res.statusCode, new Error(`Response Error: ${res.statusMessage}`), {
return callback(Boom.create(res.statusCode, new Error(`Response Error: ${res.statusCode} ${res.statusMessage}`), {
isResponseError: true,
headers: res.headers,
response: res,
payload

@@ -536,0 +537,0 @@ }));

2

package.json
{
"name": "wreck",
"description": "HTTP Client Utilities",
"version": "12.1.0",
"version": "12.2.0",
"repository": "git://github.com/hapijs/wreck",

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

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

- `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. If the error is a boom error object it will have the following properties in addition to the standard boom properties.
- `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 (i.e. 4xx or 5xx). 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
- `data.response` - the [HTTP Incoming Message](https://nodejs.org/api/http.html#http_class_http_incomingmessage) object
- `response` - The [HTTP Incoming Message](https://nodejs.org/api/http.html#http_class_http_incomingmessage)

@@ -175,6 +176,7 @@ 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. If the error is a boom error object it will have the following properties in addition to the standard boom properties.
- `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 (i.e. 4xx or 5xx). 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
- `data.response` - the [HTTP Incoming Message](https://nodejs.org/api/http.html#http_class_http_incomingmessage) object
- `response` - The [HTTP Incoming Message](https://nodejs.org/api/http.html#http_class_http_incomingmessage)

@@ -193,6 +195,7 @@ 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. If the error is a boom error object it will have the following properties in addition to the standard boom properties.
- `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 (i.e. 4xx or 5xx). 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
- `data.response` - the [HTTP Incoming Message](https://nodejs.org/api/http.html#http_class_http_incomingmessage) object
- `response` - The [HTTP Incoming Message](https://nodejs.org/api/http.html#http_class_http_incomingmessage)

@@ -212,6 +215,7 @@ 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. If the error is a boom error object it will have the following properties in addition to the standard boom properties.
- `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 (i.e. 4xx or 5xx). 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
- `data.response` - the [HTTP Incoming Message](https://nodejs.org/api/http.html#http_class_http_incomingmessage) object
- `response` - The [HTTP Incoming Message](https://nodejs.org/api/http.html#http_class_http_incomingmessage)

@@ -231,6 +235,7 @@ 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. If the error is a boom error object it will have the following properties in addition to the standard boom properties.
- `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 (i.e. 4xx or 5xx). 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
- `data.response` - the [HTTP Incoming Message](https://nodejs.org/api/http.html#http_class_http_incomingmessage) object
- `response` - The [HTTP Incoming Message](https://nodejs.org/api/http.html#http_class_http_incomingmessage)

@@ -237,0 +242,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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc