summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/net/hippie/client.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/net/hippie/client.rb b/lib/net/hippie/client.rb
index fb847fc..8983833 100644
--- a/lib/net/hippie/client.rb
+++ b/lib/net/hippie/client.rb
@@ -106,10 +106,8 @@ module Net
end
def request_for(type, uri, headers: {}, body: {})
- uri = URI.parse(uri.to_s)
- path = uri.path == '' ? '/' : uri.path
final_headers = default_headers.merge(headers)
- type.new(path || '/', final_headers).tap do |x|
+ type.new(uri.to_s, final_headers).tap do |x|
x.body = mapper.map_from(final_headers, body) unless body.empty?
end
end