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
119 120 121 122 123 124 125 126 |
# File 'lib/pact_broker/client/hal/http_client.rb', line 119 def body bod = raw_body if bod && bod != '' JSON.parse(bod) else nil end end |
#headers ⇒ Object
128 129 130 |
# File 'lib/pact_broker/client/hal/http_client.rb', line 128 def headers __getobj__().to_hash end |
#raw_body ⇒ Object
132 133 134 |
# File 'lib/pact_broker/client/hal/http_client.rb', line 132 def raw_body __getobj__().body end |
#status ⇒ Object
136 137 138 |
# File 'lib/pact_broker/client/hal/http_client.rb', line 136 def status code.to_i end |
#success? ⇒ Boolean
140 141 142 |
# File 'lib/pact_broker/client/hal/http_client.rb', line 140 def success? __getobj__().code.start_with?("2") end |