Browse files

Adding timeout options

  • Loading branch information...
1 parent f626cbc commit a0c72a960d18fdc4c4e238e30375b8c46be03747 @gabriel committed Feb 28, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/swiftype/request.rb
View
4 lib/swiftype/request.rb
@@ -31,8 +31,8 @@ def request(method, path, params, options)
request.body = ::JSON.dump(params) unless params.empty?
end
- request.options[:timeout] = 120
- request.options[:open_timeout] = 5
+ request.options[:timeout] = options[:timeout] || 30
+ request.options[:open_timeout] = options[:open_timeout] || 5
end
options[:raw] ? response : response.body
end

0 comments on commit a0c72a9

Please sign in to comment.