In the Ruby RestClient gem, what's the difference between the timeout and open-timeout functionality?
http://www.ruby-doc.org/gems/docs/w/wgibbs-rest-client-1.0.5/RestClient/Resource.html#method-i-open_timeout
I didn't get anything from the doc file of the gem either.
You're reading the wrong documentation (yours is for wgibbs-rest-client which has not been updated since 2009): here's the right one. But that one does not say anything about the difference either, although it is simple:
:open_timeout
is the timeout for opening the connection. This is useful if you are calling servers with slow or shaky response times.
:timeout
is the timeout for reading the answer. This is useful to make sure you will not get stuck half way in the reading process, or get stuck reading a 5 MB file when you're expecting 5 KB of JSON
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With