diff --git a/lib/pact/hal/link.rb b/lib/pact/hal/link.rb index 6b5b20f4..0494b9b4 100644 --- a/lib/pact/hal/link.rb +++ b/lib/pact/hal/link.rb @@ -41,11 +41,11 @@ def get(payload = {}, headers = {}) end def put(payload = nil, headers = {}) - wrap_response(href, @http_client.put(href, payload ? JSON.dump(payload) : nil, headers)) + wrap_response(href, @http_client.put(href, payload ? payload.to_json : nil, headers)) end def post(payload = nil, headers = {}) - wrap_response(href, @http_client.post(href, payload ? JSON.dump(payload) : nil, headers)) + wrap_response(href, @http_client.post(href, payload ? payload.to_json : nil, headers)) end def expand(params)