From 1fb22b6974214a41adbfd05f430cdaaac0403d33 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Fri, 22 Jun 2018 08:56:54 +1000 Subject: [PATCH] fix: correct request url in http client --- lib/pact/hal/http_client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 |