diff --git a/lib/pact/hal/http_client.rb b/lib/pact/hal/http_client.rb index 5ff71e91..130e362c 100644 --- a/lib/pact/hal/http_client.rb +++ b/lib/pact/hal/http_client.rb @@ -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 |