class CFC::Errors::HTTPError

Attributes

request[R]
response[R]

Public Class Methods

new(request, response) click to toggle source
Calls superclass method
# File lib/cfc/errors/http_error.rb, line 8
def initialize(request, response)
  super "Cloudflare API request returned HTTP #{response.code}"
  @request = request
  @response = response
end

Public Instance Methods

data() click to toggle source
# File lib/cfc/errors/http_error.rb, line 14
def data
  JSON.parse(@response.body)
end