Question

When I specify the timeout while making a Typhoeus request, is that timeout a connection timeout or download timeout? If it's a connection timeout is there any way to specify a downloading timeout as well?

Example:

Typhoeus::Request.new(url, **:timeout  => 3000**, :followlocation => true)
Was it helpful?

Solution 2

It perhaps depends on the version you are using. Since Typhoeus 0.5 it is this: libcurl timeout. Which should include the transfer. Compare to libcurl connect timeout.

OTHER TIPS

It looks like the Typhoeus README has been updated since the original post/answer.

https://github.com/typhoeus/typhoeus#timeouts

timeout and connecttimeout. timeout is the time limit for the entire request in seconds. connecttimeout is the time limit for just the connection phase, again in seconds.

There are also two more fine-grained option timeout_ms and connecttimeout_ms, but timeouts in ms are only supported if you compile curl with an asynchronous resolver.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top