(Question) Does Reqwest support **Not** waiting for a response when sending an http request? #1447
-
I'm trying to write some load testing software and I have two main use cases for my tool:
For case 2, it would make sense not to wait for a response to come back. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
No, reqwest does not support that. You'll have a hard time testing in that case. If you don't read from the socket before it's closed, you may see socket errors on either end. If you keep the socket alive and just pump requests through it, but never read, TCP will apply backpressure to the server trying to write responses. If you write a request and then drop the connection immediately, the server may notice and decide to ignore the request completely, thus not load testing your application. |
Beta Was this translation helpful? Give feedback.
No, reqwest does not support that.
You'll have a hard time testing in that case. If you don't read from the socket before it's closed, you may see socket errors on either end. If you keep the socket alive and just pump requests through it, but never read, TCP will apply backpressure to the server trying to write responses. If you write a request and then drop the connection immediately, the server may notice and decide to ignore the request completely, thus not load testing your application.