Socket
Socket
Sign inDemoInstall

node-fetch

Package Overview
Dependencies
6
Maintainers
5
Versions
96
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.6.12 to 2.6.13

4

lib/index.es.js

@@ -1364,6 +1364,2 @@ process.emitWarning("The .es.js file is deprecated. Use .mjs instead.");

if (!headers.has('Connection') && !agent) {
headers.set('Connection', 'close');
}
// HTTP-network fetch step 4.2

@@ -1370,0 +1366,0 @@ // chunked encoding is handled by Node.js

@@ -1368,6 +1368,2 @@ 'use strict';

if (!headers.has('Connection') && !agent) {
headers.set('Connection', 'close');
}
// HTTP-network fetch step 4.2

@@ -1374,0 +1370,0 @@ // chunked encoding is handled by Node.js

2

package.json
{
"name": "node-fetch",
"version": "2.6.12",
"version": "2.6.13",
"description": "A light-weight module that brings window.fetch to node.js",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -390,3 +390,2 @@ node-fetch

`Accept` | `*/*`
`Connection` | `close` _(when no `options.agent` is present)_
`Content-Length` | _(automatically calculated, if possible)_

@@ -408,2 +407,4 @@ `Transfer-Encoding` | `chunked` _(when `req.body` is a stream)_

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.

@@ -410,0 +411,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc