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 | |
| 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.
| -rw-r--r-- | CHANGELOG.md | 6 | ||||
| -rw-r--r-- | lib/net/hippie/client.rb | 3 | ||||
| -rw-r--r-- | lib/net/hippie/version.rb | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index fdc663d..bde9580 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -Version 0.2.3 +Version 0.2.4 # Changelog All notable changes to this project will be documented in this file. @@ -6,7 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [0.2.4] - 2019-02-06 ### Changed +- Send path instead of full uri. ## [0.2.3] - 2019-02-01 ### Added @@ -22,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - authorization header helpers [Unreleased]: https://github.com/mokhan/net-hippie/compare/v0.2.3...HEAD +[0.2.4]: https://github.com/mokhan/net-hippie/compare/v0.2.3...v0.2.4 [0.2.3]: https://github.com/mokhan/net-hippie/compare/v0.2.2...v0.2.3 [0.2.2]: https://github.com/mokhan/net-hippie/compare/v0.2.1...v0.2.2 [0.2.1]: https://github.com/mokhan/net-hippie/compare/v0.2.0...v0.2.1 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 |
