Class: PactBroker::Client::Hal::HttpClient::Response
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- PactBroker::Client::Hal::HttpClient::Response
- Defined in:
- lib/pact_broker/client/hal/http_client.rb
Instance Method Summary collapse
Instance Method Details
#body ⇒ Object
77 78 79 80 81 82 83 84 |
# File 'lib/pact_broker/client/hal/http_client.rb', line 77 def body bod = raw_body if bod && bod != '' JSON.parse(bod) else nil end end |
#raw_body ⇒ Object
86 87 88 |
# File 'lib/pact_broker/client/hal/http_client.rb', line 86 def raw_body __getobj__().body end |
#status ⇒ Object
90 91 92 |
# File 'lib/pact_broker/client/hal/http_client.rb', line 90 def status code.to_i end |
#success? ⇒ Boolean
94 95 96 |
# File 'lib/pact_broker/client/hal/http_client.rb', line 94 def success? __getobj__().code.start_with?("2") end |