@whatwg-node/node-fetch 0.5.13-rc-20240723175859-719078372d8029846ad8f3e93f166f95ec995e82 → 0.5.14-alpha-20240724164605-68168d4c7410c581e44e67ad3c6a1f34683ac280
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/fetchNodeHttp.js +3 -0
- package/esm/fetchNodeHttp.js +3 -0
- package/package.json +1 -1
package/cjs/fetchNodeHttp.js
CHANGED
@@ -30,6 +30,9 @@ function fetchNodeHttp(fetchRequest) {
|
|
30
30
|
: null);
|
31
31
|
const headersSerializer = fetchRequest.headersSerializer || utils_js_1.getHeadersObj;
|
32
32
|
const nodeHeaders = headersSerializer(fetchRequest.headers);
|
33
|
+
if (nodeHeaders['accept-encoding'] == null) {
|
34
|
+
nodeHeaders['accept-encoding'] = 'gzip, deflate, br';
|
35
|
+
}
|
33
36
|
const nodeRequest = requestFn(fetchRequest.url, {
|
34
37
|
method: fetchRequest.method,
|
35
38
|
headers: nodeHeaders,
|
package/esm/fetchNodeHttp.js
CHANGED
@@ -27,6 +27,9 @@ export function fetchNodeHttp(fetchRequest) {
|
|
27
27
|
: null);
|
28
28
|
const headersSerializer = fetchRequest.headersSerializer || getHeadersObj;
|
29
29
|
const nodeHeaders = headersSerializer(fetchRequest.headers);
|
30
|
+
if (nodeHeaders['accept-encoding'] == null) {
|
31
|
+
nodeHeaders['accept-encoding'] = 'gzip, deflate, br';
|
32
|
+
}
|
30
33
|
const nodeRequest = requestFn(fetchRequest.url, {
|
31
34
|
method: fetchRequest.method,
|
32
35
|
headers: nodeHeaders,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@whatwg-node/node-fetch",
|
3
|
-
"version": "0.5.
|
3
|
+
"version": "0.5.14-alpha-20240724164605-68168d4c7410c581e44e67ad3c6a1f34683ac280",
|
4
4
|
"description": "Fetch API implementation for Node",
|
5
5
|
"sideEffects": false,
|
6
6
|
"dependencies": {
|