summaryrefslogtreecommitdiff
path: root/lib/net/hippie/client.rb
diff options
context:
space:
mode:
authormokha <mokha@cisco.com>2019-02-06 09:55:24 -0700
committermokha <mokha@cisco.com>2019-02-06 09:55:24 -0700
commit7101ff16afe96540446a4256be3d33577a8b9392 (patch)
tree3125e591b73a39277c000e87d0af739ec56bccd8 /lib/net/hippie/client.rb
parent3275edae294dd25fa0784ce9e58c3a47c1d178d9 (diff)
send path instead of full uri.v0.2.4
Some servers do not respond well to sending the full path and rely on the path instead.
Diffstat (limited to 'lib/net/hippie/client.rb')
-rw-r--r--lib/net/hippie/client.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/net/hippie/client.rb b/lib/net/hippie/client.rb
index 8983833..92b41d3 100644
--- a/lib/net/hippie/client.rb
+++ b/lib/net/hippie/client.rb
@@ -106,8 +106,9 @@ module Net
end
def request_for(type, uri, headers: {}, body: {})
+ uri = URI.parse(uri.to_s)
final_headers = default_headers.merge(headers)
- type.new(uri.to_s, final_headers).tap do |x|
+ type.new(uri.path, final_headers).tap do |x|
x.body = mapper.map_from(final_headers, body) unless body.empty?
end
end