diff --git a/lib/postal/http.rb b/lib/postal/http.rb index 9d3148e..8e587c8 100644 --- a/lib/postal/http.rb +++ b/lib/postal/http.rb @@ -15,7 +15,7 @@ module Postal def self.request(method, url, options = {}) options[:headers] ||= {} uri = URI.parse(url) - request = method.new(uri.path.length == 0 ? "/" : uri.path) + request = method.new((uri.path.length == 0 ? "/" : uri.path) + (uri.query ? "?" + uri.query : "")) options[:headers].each { |k,v| request.add_field k, v } if options[:username] || uri.user