class Pact::Hal::HttpClient::Response
Public Instance Methods
body()
click to toggle source
# File lib/pact/hal/http_client.rb, line 82 def body bod = raw_body if bod && bod != '' JSON.parse(bod) else nil end end
json?()
click to toggle source
# File lib/pact/hal/http_client.rb, line 103 def json? self['content-type'] && self['content-type'] =~ /json/ end
raw_body()
click to toggle source
# File lib/pact/hal/http_client.rb, line 91 def raw_body __getobj__().body end
status()
click to toggle source
# File lib/pact/hal/http_client.rb, line 95 def status code.to_i end
success?()
click to toggle source
# File lib/pact/hal/http_client.rb, line 99 def success? __getobj__().code.start_with?("2") end