Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to increase Net::HTTP read_timeout #12

Open
KieranP opened this issue Oct 28, 2012 · 1 comment
Open

Ability to increase Net::HTTP read_timeout #12

KieranP opened this issue Oct 28, 2012 · 1 comment

Comments

@KieranP
Copy link

KieranP commented Oct 28, 2012

Requests that take a while to return end up timing out waiting for response. This can be problematic if the request takes more than the default timeout.

It would be nice to set a custom read_timeout for the Net::HTTP object created in consumer.rb#create_http

Here are some related resources:
http://www.ruby-doc.org/stdlib-1.9.3/libdoc/net/http/rdoc/Net/HTTP.html#method-i-read_timeout-3D
https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-talk/_byV2ua39fI

It would be handy to be able to do something like this:

@consumer = ::OAuth::Consumer.new(..., ..., { :timeout => 120 })
@mikeantonelli
Copy link

@KieranP, using the current version, the code snippet below will modify both the read_time and open_timeout.

OAuth::Consumer.new(key, secret, timeout: 120)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants