Skip to content

Commit

Permalink
enable GET requests with body in Patron
Browse files Browse the repository at this point in the history
They are still unsupported in Patron itself because of
toland/patron#52
  • Loading branch information
mislav committed Dec 30, 2011
1 parent d91b051 commit 66fba21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/faraday/adapter/patron.rb
Expand Up @@ -17,7 +17,7 @@ def call(env)
end

response = begin
data = Connection::METHODS_WITH_BODIES.include?(env[:method]) ? env[:body].to_s : nil
data = env[:body] ? env[:body].to_s : nil
session.request(env[:method], env[:url].to_s, env[:request_headers], :data => data)
rescue Errno::ECONNREFUSED
raise Error::ConnectionFailed, $!
Expand Down

0 comments on commit 66fba21

Please sign in to comment.