fix: change Mb to MB
This commit is contained in:
parent
73b7a08974
commit
0936a9af0a
|
@ -491,7 +491,7 @@ const options = {
|
||||||
|
|
||||||
#### Custom highWaterMark
|
#### Custom highWaterMark
|
||||||
|
|
||||||
Stream on Node.js have a smaller internal buffer size (16Kb, aka `highWaterMark`) from client-side browsers (>1Mb, not consistent across browsers). Because of that, when you are writing an isomorphic app and using `res.clone()`, it will hang with large response in Node.
|
Stream on Node.js have a smaller internal buffer size (16Kb, aka `highWaterMark`) from client-side browsers (>1MB, not consistent across browsers). Because of that, when you are writing an isomorphic app and using `res.clone()`, it will hang with large response in Node.
|
||||||
|
|
||||||
The recommended way to fix this problem is to resolve cloned response in parallel:
|
The recommended way to fix this problem is to resolve cloned response in parallel:
|
||||||
|
|
||||||
|
@ -513,7 +513,10 @@ If for some reason you don't like the solution above, since `3.x` you are able t
|
||||||
```js
|
```js
|
||||||
const fetch = require('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
|
|
||||||
fetch('https://example.com', {highWaterMark: 10}).then(res => res.clone().buffer());
|
fetch('https://example.com', {
|
||||||
|
// About 1MB
|
||||||
|
highWaterMark: 1024 * 1024
|
||||||
|
}).then(res => res.clone().buffer());
|
||||||
```
|
```
|
||||||
|
|
||||||
<a id="class-request"></a>
|
<a id="class-request"></a>
|
||||||
|
|
Loading…
Reference in New Issue