lib/hello_sign/client.rb in hellosign-ruby-sdk-3.6.4 vs lib/hello_sign/client.rb in hellosign-ruby-sdk-3.7.0
- old
+ new
@@ -88,11 +88,12 @@
# @option options [Hash] params params of the url
#
def get(path, options={})
response = request(path, :get, options)
validate response
- parse response
+ parsed_response = parse response
+ data = { headers: response.headers, body: parsed_response }
end
#
# Make a http post request
# @param path [String] relative path of the request
@@ -100,11 +101,12 @@
# @option options [Hash] body request body
#
def post(path, options={})
response = request(path, :post, options)
validate response
- parse response
+ parsed_response = parse response
+ data = { headers: response.headers, body: parsed_response }
end
#
# Make a http put request
# @param path [String] relative path of the request
@@ -112,21 +114,23 @@
# @option options [Hash] body request body
#
def put(path, options={})
response = request(path, :put, options)
validate response
- parse response
+ responsed_response = parse response
+ data = { headers: response.headers, body: parsed_response }
end
#
# Make a http delete request
# @param path [String] relative path of the request
# @option options [Hash] params params of the url
#
def delete(path, options={})
response = request(path, :delete, options)
validate response
- parse response
+ parsed_response = parse response
+ data = { headers: response.headers, body: parsed_response }
end
private
def request(path, method, options={})