lib/rest_dsl/client.rb in rest_dsl-0.1.4 vs lib/rest_dsl/client.rb in rest_dsl-0.1.5

- old
+ new

@@ -31,10 +31,10 @@ end def execute(method, endpoint, headers, payload: nil, **hash_args, &block) url = "#{@base_url}/#{endpoint}" args = { method: method.to_sym, url: url, headers: headers } - args.merge!(payload: payload) if payload && method_has_payload?(method) + args.merge!(payload: payload.to_json) if payload && method_has_payload?(method) args.merge!(hash_args) response = begin RestClient::Request.new(args).execute(&block) \ No newline at end of file