You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData) besides text data and buffers can also utilize streams via [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) objects:
252
+
253
+
```js
254
+
import { openAsBlob } from'node:fs'
255
+
256
+
constfile=awaitopenAsBlob('./big.csv')
257
+
constbody=newFormData()
258
+
body.set('file', file, 'big.csv')
259
+
260
+
awaitfetch('http://example.com', { method:'POST', body })
Copy file name to clipboardexpand all lines: deps/undici/src/docs/docs/api/Dispatcher.md
+6
Original file line number
Diff line number
Diff line change
@@ -969,6 +969,12 @@ Parameters:
969
969
***targets**`Array<Dispatcher>`
970
970
***error**`Error`
971
971
972
+
Emitted when the dispatcher has been disconnected from the origin.
973
+
974
+
> **Note**: For HTTP/2, this event is also emitted when the dispatcher has received the [GOAWAY Frame](https://webconcepts.info/concepts/http2-frame-type/0x7) with an Error with the message `HTTP/2: "GOAWAY" frame received` and the code `UND_ERR_INFO`.
975
+
> Due to nature of the protocol of using binary frames, it is possible that requests gets hanging as a frame can be received between the `HEADER` and `DATA` frames.
976
+
> It is recommended to handle this event and close the dispatcher to create a new HTTP/2 session.
0 commit comments