@whatwg-node/node-fetch 0.3.0 → 0.3.1-alpha-20230228121813-6a22ee6
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/index.js +1 -1
- package/index.mjs +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1047,7 +1047,7 @@ class PonyfillResponse extends PonyfillBody {
|
|
1047
1047
|
if (init) {
|
1048
1048
|
this.headers = new PonyfillHeaders(init.headers);
|
1049
1049
|
this.status = init.status || 200;
|
1050
|
-
this.statusText = init.statusText || 'OK';
|
1050
|
+
this.statusText = init.statusText || http.STATUS_CODES[this.status] || 'OK';
|
1051
1051
|
this.url = init.url || '';
|
1052
1052
|
this.redirected = init.redirected || false;
|
1053
1053
|
this.type = init.type || 'default';
|
package/index.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createReadStream } from 'fs';
|
2
|
-
import { request as request$1 } from 'http';
|
2
|
+
import { STATUS_CODES, request as request$1 } from 'http';
|
3
3
|
import { request } from 'https';
|
4
4
|
import { Readable } from 'stream';
|
5
5
|
import { fileURLToPath } from 'url';
|
@@ -1041,7 +1041,7 @@ class PonyfillResponse extends PonyfillBody {
|
|
1041
1041
|
if (init) {
|
1042
1042
|
this.headers = new PonyfillHeaders(init.headers);
|
1043
1043
|
this.status = init.status || 200;
|
1044
|
-
this.statusText = init.statusText || 'OK';
|
1044
|
+
this.statusText = init.statusText || STATUS_CODES[this.status] || 'OK';
|
1045
1045
|
this.url = init.url || '';
|
1046
1046
|
this.redirected = init.redirected || false;
|
1047
1047
|
this.type = init.type || 'default';
|