http icon indicating copy to clipboard operation
http copied to clipboard

Elapsed time timeout

Open shaicoleman opened this issue 5 years ago • 2 comments

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.

shaicoleman avatar Aug 26 '19 10:08 shaicoleman

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.

ixti avatar Aug 26 '19 19:08 ixti

In that case perhaps a different term is needed, e.g.

  • elapsed time timeout
  • overall timeout
  • total time timeout
  • cumulative time timeout

shaicoleman avatar Aug 27 '19 00:08 shaicoleman