toland/patron — Issue #52: GET requests with body not supported
Author: mislav
Created: 2011-12-30 16:00:32+00:00
State: open

GET requests with body are unusual, but they are allowed (so I've heard, I couldn't find relevant quote from the HTTP spec).

Patron silently discards the body of a GET request. Proof:

~~~ ruby
require 'patron'

session = Patron::Session.new
response = session.request :get,
'http://localhost:4567/echo',
{'Content-type'=>'application/x-www-form-urlencoded'},
:data => 'name=mislav'

p response.body
# server reports that there was no request body!
~~~