httprb / http

HTTP (The Gem! a.k.a. http.rb) - a fast Ruby HTTP client with a chainable API, streaming support, and timeouts
MIT License
3k stars 321 forks source link

Timeout workflow is not well-documented #619

Open csuhta opened 4 years ago

csuhta commented 4 years ago

I only recently started using this gem, and the documentation on how to handle request timeouts isn't very clear. I'm happy to update the wiki but I wanted to make sure this is correct:

If you are using HTTP.timeout(10).get(…) is the proper workflow to catch the HTTP::Timeout exception? Or is HTTP::Timeout only raised in default/internal code circumstances?

https://github.com/httprb/http/wiki/Timeouts

uberllama commented 3 years ago

I'd love to see some illumination on this, particularly as regards thread safety.