@whatwg-node/node-fetch 0.7.4-alpha-20241125131513-7ac7e92d53ef0d5a6ddab6fcb0b311d88708df6d → 0.7.4-alpha-20241125134618-c16c2cc24251a5902f85c9dcc0ecdd373f7568ff
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 +1 -1
- package/esm/fetchNodeHttp.js +1 -1
- package/package.json +1 -1
package/cjs/fetchNodeHttp.js
CHANGED
@@ -38,7 +38,6 @@ function fetchNodeHttp(fetchRequest) {
|
|
38
38
|
auth: fetchRequest.parsedUrl.username
|
39
39
|
? `${fetchRequest.parsedUrl.username}:${fetchRequest.parsedUrl.password}`
|
40
40
|
: undefined,
|
41
|
-
host: fetchRequest.parsedUrl.host,
|
42
41
|
hostname: fetchRequest.parsedUrl.hostname,
|
43
42
|
method: fetchRequest.method,
|
44
43
|
path: fetchRequest.parsedUrl.pathname + (fetchRequest.parsedUrl.search || ''),
|
@@ -88,6 +87,7 @@ function fetchNodeHttp(fetchRequest) {
|
|
88
87
|
}
|
89
88
|
if (fetchRequest.redirect === 'follow') {
|
90
89
|
const redirectedUrl = new URL_js_1.PonyfillURL(nodeResponse.headers.location, fetchRequest.parsedUrl || fetchRequest.url);
|
90
|
+
console.log('Redirecting to', nodeResponse.headers.location, redirectedUrl.toString());
|
91
91
|
const redirectResponse$ = fetchNodeHttp(new Request_js_1.PonyfillRequest(redirectedUrl, fetchRequest));
|
92
92
|
resolve(redirectResponse$.then(redirectResponse => {
|
93
93
|
redirectResponse.redirected = true;
|
package/esm/fetchNodeHttp.js
CHANGED
@@ -35,7 +35,6 @@ export function fetchNodeHttp(fetchRequest) {
|
|
35
35
|
auth: fetchRequest.parsedUrl.username
|
36
36
|
? `${fetchRequest.parsedUrl.username}:${fetchRequest.parsedUrl.password}`
|
37
37
|
: undefined,
|
38
|
-
host: fetchRequest.parsedUrl.host,
|
39
38
|
hostname: fetchRequest.parsedUrl.hostname,
|
40
39
|
method: fetchRequest.method,
|
41
40
|
path: fetchRequest.parsedUrl.pathname + (fetchRequest.parsedUrl.search || ''),
|
@@ -85,6 +84,7 @@ export function fetchNodeHttp(fetchRequest) {
|
|
85
84
|
}
|
86
85
|
if (fetchRequest.redirect === 'follow') {
|
87
86
|
const redirectedUrl = new PonyfillURL(nodeResponse.headers.location, fetchRequest.parsedUrl || fetchRequest.url);
|
87
|
+
console.log('Redirecting to', nodeResponse.headers.location, redirectedUrl.toString());
|
88
88
|
const redirectResponse$ = fetchNodeHttp(new PonyfillRequest(redirectedUrl, fetchRequest));
|
89
89
|
resolve(redirectResponse$.then(redirectResponse => {
|
90
90
|
redirectResponse.redirected = true;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@whatwg-node/node-fetch",
|
3
|
-
"version": "0.7.4-alpha-
|
3
|
+
"version": "0.7.4-alpha-20241125134618-c16c2cc24251a5902f85c9dcc0ecdd373f7568ff",
|
4
4
|
"description": "Fetch API implementation for Node",
|
5
5
|
"sideEffects": false,
|
6
6
|
"dependencies": {
|