Comparing version 2.0.1 to 2.0.2
@@ -17,3 +17,9 @@ function __export(m) { | ||
} | ||
function unzipHeaders(request) { | ||
if (!request.get('Accept-Encoding')) { | ||
request.set('Accept-Encoding', 'gzip,deflate'); | ||
} | ||
} | ||
function unzip(request) { | ||
request.before(unzipHeaders); | ||
request.after(unzipResponse); | ||
@@ -39,9 +45,6 @@ } | ||
exports.concatStream = concatStream; | ||
function defaultHeadersNode(request) { | ||
function defaultHeaders(request) { | ||
if (!request.get('User-Agent')) { | ||
request.set('User-Agent', 'https://github.com/blakeembrey/popsicle'); | ||
} | ||
if (!request.get('Accept-Encoding')) { | ||
request.set('Accept-Encoding', 'gzip,deflate'); | ||
} | ||
if (request.body instanceof FormData) { | ||
@@ -88,3 +91,3 @@ request.set('Content-Type', 'multipart/form-data; boundary=' + request.body.getBoundary()); | ||
common_2.headers(request); | ||
request.before(defaultHeadersNode); | ||
request.before(defaultHeaders); | ||
} | ||
@@ -91,0 +94,0 @@ exports.headers = headers; |
{ | ||
"name": "popsicle", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Simple HTTP requests for node and the browser", | ||
@@ -5,0 +5,0 @@ "main": "dist/lib/index.js", |
Sorry, the diff of this file is not supported yet
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
99958
1163