Skip to content

Commit

Permalink
fix: correct request url in http client
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jun 21, 2018
1 parent d4792f3 commit 1fb22b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pact/hal/http_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def post href, body = nil, headers = {}
end

def create_request uri, http_method, body = nil, headers = {}
request = Net::HTTP.const_get(http_method).new(uri.to_s)
request = Net::HTTP.const_get(http_method).new(uri.request_uri)
request['Content-Type'] = "application/json" if ['Post', 'Put', 'Patch'].include?(http_method)
request['Accept'] = "application/hal+json"
headers.each do | key, value |
Expand Down

0 comments on commit 1fb22b6

Please sign in to comment.