Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding timeout options

  • Loading branch information...
commit a0c72a960d18fdc4c4e238e30375b8c46be03747 1 parent f626cbc
@gabriel authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.