reqwest icon indicating copy to clipboard operation
reqwest copied to clipboard

Add option to set write timeout

Open link2xt opened this issue 5 months ago • 0 comments

This feature was added at some point and https://github.com/seanmonstar/reqwest/pull/62 clearly has been setting write timeout.

But now I am looking at reqwest 0.12.7 and there are only options to set read timeout, connect timeout and request timeout. This does not allow to e.g. upload a large file via POST request, because in this case I cannot set request timeout in advance as request may take an hour and write operation may get stuck if the server stops reading from the socket for some reason.

Grepping the source code for write_timeout reveals only this test which sets request timeout: https://github.com/seanmonstar/reqwest/blob/88bd9be6df0ad19957f88f6a1ab5592917f4f9ca/tests/timeouts.rs#L375

There is a similar issue https://github.com/seanmonstar/reqwest/issues/870

link2xt avatar Aug 25 '24 15:08 link2xt