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
process(Chunk) %% call stream_next/1 again for the next chunk
147
+
end.
148
+
```
149
+
133
150
## Connection Multiplexing
134
151
135
152
HTTP/2 allows multiple concurrent requests on a single connection. Unlike HTTP/1.1 where each request needs its own connection, HTTP/2 multiplexes requests as independent "streams" on a shared connection.
@@ -329,6 +346,24 @@ HTTP/2 has built-in flow control to prevent fast senders from overwhelming slow
329
346
330
347
No configuration is needed for most use cases.
331
348
349
+
### Sending Large Bodies
350
+
351
+
A request body larger than the server's flow control window cannot be sent in one shot: the send waits for the server to open the window with WINDOW_UPDATE frames. Hackney blocks the request until the body is fully handed to the connection, up to `send_timeout` (default 30000 ms). If the server never opens the window, the request fails with `{error, timeout}` instead of hanging.
352
+
353
+
```erlang
354
+
%% Give a slow server more time to drain a large upload
0 commit comments