Skip to content
Browse files

Preserve query string

  • Loading branch information...
1 parent 265a6ab commit 882c57bbe7d9036e545a515c34037e437ce61069 @ctcherry committed Jun 30, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/plain_http.rb
View
3 lib/plain_http.rb
@@ -26,8 +26,7 @@ def self.request(method, url, headers, data)
method_class_name = method.to_s.downcase.sub(/^[a-z]/i) {|m| m.upcase}
req_class = Net::HTTP.const_get(method_class_name)
uri = URI.parse(url)
- path = uri.path == '' ? '/' : uri.path
- req = req_class.new(path, headers)
+ req = req_class.new(uri.request_uri, headers)
if data.respond_to?(:to_hash)
req.set_form_data(data.to_hash)
elsif data.to_s != ''

0 comments on commit 882c57b

Please sign in to comment.
Something went wrong with that request. Please try again.