diff options
| author | mokha <mokha@cisco.com> | 2019-02-06 09:55:24 -0700 |
|---|---|---|
| committer | mokha <mokha@cisco.com> | 2019-02-06 09:55:24 -0700 |
| commit | 7101ff16afe96540446a4256be3d33577a8b9392 (patch) | |
| tree | 3125e591b73a39277c000e87d0af739ec56bccd8 /lib | |
| parent | 3275edae294dd25fa0784ce9e58c3a47c1d178d9 (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')
| -rw-r--r-- | lib/net/hippie/client.rb | 3 | ||||
| -rw-r--r-- | lib/net/hippie/version.rb | 2 |
2 files changed, 3 insertions, 2 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 diff --git a/lib/net/hippie/version.rb b/lib/net/hippie/version.rb index d05f6fe..65ff437 100644 --- a/lib/net/hippie/version.rb +++ b/lib/net/hippie/version.rb @@ -2,6 +2,6 @@ module Net module Hippie - VERSION = '0.2.3' + VERSION = '0.2.4' end end |
