class PactBroker::Client::Hal::HttpClient::Response

Public Instance Methods

body() click to toggle source
# File lib/pact_broker/client/hal/http_client.rb, line 177
def body
  bod = raw_body
  if bod && bod != ''
    JSON.parse(bod)
  else
    nil
  end
end
header(name) click to toggle source
# File lib/pact_broker/client/hal/http_client.rb, line 190
def header(name)
  __getobj__()[name]
end
headers() click to toggle source
# File lib/pact_broker/client/hal/http_client.rb, line 186
def headers
  __getobj__().to_hash
end
raw_body() click to toggle source
# File lib/pact_broker/client/hal/http_client.rb, line 194
def raw_body
  __getobj__().body
end
status() click to toggle source
# File lib/pact_broker/client/hal/http_client.rb, line 198
def status
  code.to_i
end
success?() click to toggle source
# File lib/pact_broker/client/hal/http_client.rb, line 202
def success?
  __getobj__().code.start_with?("2")
end