You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure where I can ask this question, so apologies if this clutters the issue list a bit.
Where/How can I set a timeout for a request? Given the below class, I thgouth I could put it in the options hash along with my :basic_auth settings, but that doesn't seem to affect how long it takes before timing out.
class MyRequest
include HTTParty
def initialize(u, p)
@auth = {:username => u, :password => p}
end
def get(path)
options = {:basic_auth => @auth, :timeout => 120000} # I didn't know if it would be ms or seconds
self.class.get(path, options)
end
end
Anyone know how to do this?
The text was updated successfully, but these errors were encountered:
I'm not sure where I can ask this question, so apologies if this clutters the issue list a bit.
Where/How can I set a timeout for a request? Given the below class, I thgouth I could put it in the options hash along with my
:basic_auth
settings, but that doesn't seem to affect how long it takes before timing out.Anyone know how to do this?
The text was updated successfully, but these errors were encountered: