node-fetch
Advanced tools
Comparing version 3.3.1 to 3.3.2
{ | ||
"name": "node-fetch", | ||
"version": "3.3.1", | ||
"version": "3.3.2", | ||
"description": "A light-weight module that brings Fetch API to node.js", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -542,3 +542,2 @@ <div align="center"> | ||
| `Accept` | `*/*` | | ||
| `Connection` | `close` _(when no `options.agent` is present)_ | | ||
| `Content-Length` | _(automatically calculated, if possible)_ | | ||
@@ -562,2 +561,4 @@ | `Host` | _(host and port information from the target URI)_ | | ||
If no agent is specified, the default agent provided by Node.js is used. Note that [this changed in Node.js 19](https://github.com/nodejs/node/blob/4267b92604ad78584244488e7f7508a690cb80d0/lib/_http_agent.js#L564) to have `keepalive` true by default. If you wish to enable `keepalive` in an earlier version of Node.js, you can override the agent as per the following code sample. | ||
In addition, the `agent` option accepts a function that returns `http`(s)`.Agent` instance given current [URL](https://nodejs.org/api/url.html), this is useful during a redirection chain across HTTP and HTTPS protocol. | ||
@@ -564,0 +565,0 @@ |
@@ -291,6 +291,2 @@ /** | ||
if (!headers.has('Connection') && !agent) { | ||
headers.set('Connection', 'close'); | ||
} | ||
// HTTP-network fetch step 4.2 | ||
@@ -297,0 +293,0 @@ // chunked encoding is handled by Node.js |
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
107319
873
2317