electron-fetch
Advanced tools
Comparing version 1.9.2-0 to 1.9.2-2
@@ -1241,10 +1241,5 @@ import { parse, format, resolve } from 'url'; | ||
headers.set('Accept-Encoding', 'gzip,deflate'); | ||
if (!headers.has('Connection')) { | ||
headers.set('Connection', 'close'); | ||
} // HTTP-network fetch step 4 | ||
headers.set('Accept-Encoding', 'gzip,deflate'); // HTTP-network fetch step 4 | ||
// chunked encoding is handled by Node.js when not running in electron | ||
return Object.assign({}, parsedURL, { | ||
@@ -1251,0 +1246,0 @@ method: request.method, |
@@ -1269,10 +1269,5 @@ 'use strict'; | ||
headers.set('Accept-Encoding', 'gzip,deflate'); | ||
if (!headers.has('Connection')) { | ||
headers.set('Connection', 'close'); | ||
} // HTTP-network fetch step 4 | ||
headers.set('Accept-Encoding', 'gzip,deflate'); // HTTP-network fetch step 4 | ||
// chunked encoding is handled by Node.js when not running in electron | ||
return Object.assign({}, parsedURL, { | ||
@@ -1279,0 +1274,0 @@ method: request.method, |
{ | ||
"name": "electron-fetch", | ||
"version": "1.9.2-0", | ||
"version": "1.9.2-2", | ||
"description": "A light-weight module that brings window.fetch to electron's background process", | ||
@@ -56,3 +56,3 @@ "main": "lib/index.js", | ||
"cross-env": "^7.0.3", | ||
"electron": "^21.0.0", | ||
"electron": "^31", | ||
"electron-mocha": "^11.0.2", | ||
@@ -59,0 +59,0 @@ "form-data": "^4.0.0", |
@@ -217,2 +217,4 @@ | ||
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. | ||
##### Default Headers | ||
@@ -226,3 +228,2 @@ | ||
| `Accept` | `*/*` | | ||
| `Connection` | `close` | | ||
| `Content-Length` | _(automatically calculated, if possible)_ | | ||
@@ -229,0 +230,0 @@ | `User-Agent` | `electron-fetch/1.0 (+https://github.com/arantes555/electron-fetch)` | |
411
107848
6
2676