@whatwg-node/node-fetch 0.0.3 → 0.0.4
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 +2 -3
- package/index.mjs +2 -3
- package/package.json +1 -1
package/index.js
CHANGED
@@ -559,10 +559,9 @@ function processBodyInit(bodyInit) {
|
|
559
559
|
return {
|
560
560
|
bodyType: BodyInitType.String,
|
561
561
|
contentType: 'text/plain;charset=UTF-8',
|
562
|
-
contentLength: bodyInit
|
562
|
+
contentLength: Buffer.byteLength(bodyInit),
|
563
563
|
bodyFactory() {
|
564
|
-
const
|
565
|
-
const readable = stream.Readable.from(buffer);
|
564
|
+
const readable = stream.Readable.from(bodyInit);
|
566
565
|
return new PonyfillReadableStream(readable);
|
567
566
|
},
|
568
567
|
};
|
package/index.mjs
CHANGED
@@ -553,10 +553,9 @@ function processBodyInit(bodyInit) {
|
|
553
553
|
return {
|
554
554
|
bodyType: BodyInitType.String,
|
555
555
|
contentType: 'text/plain;charset=UTF-8',
|
556
|
-
contentLength: bodyInit
|
556
|
+
contentLength: Buffer.byteLength(bodyInit),
|
557
557
|
bodyFactory() {
|
558
|
-
const
|
559
|
-
const readable = Readable.from(buffer);
|
558
|
+
const readable = Readable.from(bodyInit);
|
560
559
|
return new PonyfillReadableStream(readable);
|
561
560
|
},
|
562
561
|
};
|