Comparing version 2.27.0 to 2.28.0
@@ -316,3 +316,4 @@ /*global JSON, setTimeout, setImmediate*/ | ||
method = options.method, | ||
requestUrl = typeof options.path === 'string' ? options.path : options.url; | ||
requestUrl = typeof options.path === 'string' ? options.path : options.url, | ||
autoDecodeJson = typeof options.json !== 'undefined' ? options.json !== false : this.json !== false; // Defaults to true | ||
@@ -742,3 +743,3 @@ Object.keys(headers).forEach(function (header) { | ||
response.body = Buffer.concat(responseBodyChunks); | ||
if (isContentTypeJson(response.headers['content-type']) && response.req.method !== 'HEAD') { | ||
if (isContentTypeJson(response.headers['content-type']) && response.req.method !== 'HEAD' && autoDecodeJson) { | ||
// 'HEAD' requests have blank response | ||
@@ -745,0 +746,0 @@ try { |
{ | ||
"name": "teepee", | ||
"version": "2.27.0", | ||
"version": "2.28.0", | ||
"description": "Generic HTTP client", | ||
@@ -5,0 +5,0 @@ "main": "lib/Teepee.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
128924
2618