node-superfetch
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -16,2 +16,3 @@ const fetch = require('node-fetch'); | ||
this.redirectCount = typeof options.redirects === 'undefined' ? 20 : options.redirects; | ||
this.agent = options.agent || null; | ||
} | ||
@@ -24,3 +25,4 @@ | ||
follow: this.redirectCount, | ||
body: this.body | ||
body: this.body, | ||
agent: this.agent | ||
}); | ||
@@ -127,2 +129,7 @@ const raw = await response.buffer(); | ||
} | ||
agent(agent) { | ||
this.agent = agent; | ||
return this; | ||
} | ||
} | ||
@@ -129,0 +136,0 @@ |
{ | ||
"name": "node-superfetch", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "A wrapper for node-fetch that makes it appear like superagent.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -27,3 +27,3 @@ # node-superfetch | ||
headers), `send` (for adding POST data and such), `attach` (for sending | ||
FormData), and `redirects` (for setting the allowed number of redirects). `end` | ||
is also supported for callbacks. | ||
FormData), `redirects` (for setting the allowed number of redirects), and | ||
`agent` (for setting the HTTP agent). `end` is also supported for callbacks. |
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
7045
127