@whatwg-node/node-fetch 0.5.13 → 0.5.14-alpha-20240724164935-6b596949c539f21d02f8783509d3ad994075ba42
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