class APIClientBuilder::PutRequest

Public Instance Methods

response() click to toggle source

Yields the response body if the response was successful. Will call the response handlers if there was not a successful response.

@return [JSON] the http response body

# File lib/api_client_builder/put_request.rb, line 7
def response
  response = response_handler.put_request(@body)

  if response.success?
    response
  else
    error_handlers.each do |handler|
      handler.call(response, self)
    end
  end
end