lib/intercom/request.rb in intercom-0.1.17 vs lib/intercom/request.rb in intercom-0.1.19
- old
+ new
@@ -23,11 +23,11 @@
def self.post(path, form_data)
new(path, method_with_body(Net::HTTP::Post, path, form_data))
end
def self.delete(path, params)
- new(path, Net::HTTP::Delete.new(append_query_string_to_url(path, params), default_headers))
+ new(path, method_with_body(Net::HTTP::Delete, path, params))
end
def self.put(path, form_data)
new(path, method_with_body(Net::HTTP::Put, path, form_data))
end
@@ -48,12 +48,12 @@
if uri.is_a?(URI::HTTPS)
net.use_ssl = true
net.verify_mode = OpenSSL::SSL::VERIFY_PEER
net.ca_file = File.join(File.dirname(__FILE__), '../data/cacert.pem')
end
- net.read_timeout = 30
- net.open_timeout = 3
+ net.read_timeout = 90
+ net.open_timeout = 30
net
end
def execute(target_base_url=nil)
base_uri = URI.parse(target_base_url)
@@ -91,6 +91,6 @@
return url if params.empty?
query_string = params.map { |k, v| "#{k.to_s}=#{CGI::escape(v.to_s)}" }.join('&')
url + "?#{query_string}"
end
end
-end
\ No newline at end of file
+end