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
72 73 74 75 76 77 78 79 |
# File 'lib/pact_broker/client/hal/http_client.rb', line 72 def body bod = raw_body if bod && bod != '' JSON.parse(bod) else nil end end |
#raw_body ⇒ Object
81 82 83 |
# File 'lib/pact_broker/client/hal/http_client.rb', line 81 def raw_body __getobj__().body end |
#status ⇒ Object
85 86 87 |
# File 'lib/pact_broker/client/hal/http_client.rb', line 85 def status code.to_i end |
#success? ⇒ Boolean
89 90 91 |
# File 'lib/pact_broker/client/hal/http_client.rb', line 89 def success? __getobj__().code.start_with?("2") end |