module RestApiClient::Request
Public Instance Methods
request(method, path, body, params, opts)
click to toggle source
# File lib/rest_api_client/request.rb, line 10 def request(method, path, body, params, opts) response = connection.send(method) do | request| request.headers = request.headers.merge(opts[:headers]) if opts[:headers].present? request.path = path request.params = params if params.present? request.body = body if body.present? end puts connection.params response = Response.create(response) end