mirror of
https://github.com/lostisland/faraday.git
synced 2025-10-16 00:03:37 -04:00
commit
b7df22ccde
@ -11,6 +11,11 @@ module Faraday
|
||||
|
||||
session = ::Patron::Session.new
|
||||
|
||||
if req = env[:request]
|
||||
session.timeout = session.connect_timeout = req[:timeout] if req[:timeout]
|
||||
session.connect_timeout = req[:open_timeout] if req[:open_timeout]
|
||||
end
|
||||
|
||||
response = begin
|
||||
data = Connection::METHODS_WITH_BODIES.include?(env[:method]) ? env[:body].to_s : nil
|
||||
session.request(env[:method], env[:url].to_s, env[:request_headers], :data => data)
|
||||
|
Loading…
x
Reference in New Issue
Block a user