http
http copied to clipboard
Elapsed time timeout
I believe at the moment it's only possibly to either specify a per operation timeout or a global timeout. Would be good if it were possible to combine both timeouts, e.g.
HTTP.timeout(global: 60, connect: 5, write: 2, read: 10).get 'http://example.com'
This is needed to handle servers that send unending responses or that send out data very slowly.
Hm... But global timeout is doing a bit different thing, it's basically timeout for connect + write + read
. IN other words it won't solve your problem if I understand correctly.
In that case perhaps a different term is needed, e.g.
- elapsed time timeout
- overall timeout
- total time timeout
- cumulative time timeout