{"comment":{"created_at":"2011-10-13T00:59:48Z","body":"Hmm. then it might be an issue of gemset... (by rvm or by setting GEM_HOME or by using --user-install)","updated_at":"2011-10-13T00:59:48Z","url":"https://api.github.com/repos/nahi/httpclient/issues/comments/2390138","id":2390138,"user":{"avatar_url":"https://secure.gravatar.com/avatar/6c06915d9aa00cd5c7d4acfb27cdd4e9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/nahi","id":44209,"login":"nahi"}},"action":"created","issue":{"number":60,"created_at":"2011-06-30T17:40:34Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Hi.\r\n\r\nI've had requests called like that:\r\n\r\n```ruby\r\nclient.post(\"http://example.com/script\", {:x => 1, :y => 'some string'}, {'X-Requested-With' => 'XMLHttpRequest'})\r\n```\r\n\r\nafter update all of them got broken.\r\nUsing debugger I've found out that problem is in HTTPClient::request method. It has following line:\r\n\r\n```ruby\r\nquery, body, header, follow_redirect = keyword_argument(args, :query, :body, :header, :follow_redirect)\r\n```\r\n\r\nBut there's no query argument passed by HTTPClient::post method, so query gets body params :(\r\nMy fix is the following:\r\n\r\n```ruby\r\nclass HTTPClientFix < HTTPClient\r\n  def post(uri, *args, &block)\r\n    request(:post, uri, nil, *args, &block)\r\n  end\r\nend\r\n```\r\n\r\nNow query is explicitly set to nil and everything is ok, POST requests are sent as they should.","comments":10,"title":"version 2.2.1 broke post requests","updated_at":"2011-10-13T00:59:48Z","url":"https://api.github.com/repos/nahi/httpclient/issues/60","id":1145322,"assignee":null,"milestone":null,"closed_at":"2011-10-12T21:59:13Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/986d656731e8d7d8a2c9d5fb2ab35305?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/naquad","id":20373,"login":"naquad"},"html_url":"https://github.com/nahi/httpclient/issues/60","labels":[{"name":"InfoNeeded","url":"https://api.github.com/repos/nahi/httpclient/labels/InfoNeeded","color":"fff200"}],"state":"closed"},"legacy":{"issue_id":1145322,"comment_id":2390138}}