Class: WSDL::HTTP::Response
- Inherits:
-
Data
- Object
- Data
- WSDL::HTTP::Response
- Defined in:
- lib/wsdl/http/response.rb
Overview
Represents an HTTP response returned by an HTTP client.
All HTTP client get and post methods must return an instance of
this class (or a compatible object responding to status, headers,
and body).
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status:, headers: {}, body: '') ⇒ Response
constructor
Creates a new Response.
Constructor Details
#initialize(status:, headers: {}, body: '') ⇒ Response
Creates a new Response.
28 29 30 |
# File 'lib/wsdl/http/response.rb', line 28 def initialize(status:, headers: {}, body: '') super end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body
22 23 24 |
# File 'lib/wsdl/http/response.rb', line 22 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers
22 23 24 |
# File 'lib/wsdl/http/response.rb', line 22 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status
22 23 24 |
# File 'lib/wsdl/http/response.rb', line 22 def status @status end |