Class: WSDL::HTTPResponse
- Inherits:
-
Data
- Object
- Data
- WSDL::HTTPResponse
- Defined in:
- lib/wsdl/http_response.rb
Overview
Represents an HTTP response returned by an HTTP adapter.
All HTTP adapter +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: '') ⇒ HTTPResponse
constructor
Creates a new HTTPResponse.
Constructor Details
#initialize(status:, headers: {}, body: '') ⇒ HTTPResponse
Creates a new HTTPResponse.
27 28 29 |
# File 'lib/wsdl/http_response.rb', line 27 def initialize(status:, headers: {}, body: '') super end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body
21 22 23 |
# File 'lib/wsdl/http_response.rb', line 21 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers
21 22 23 |
# File 'lib/wsdl/http_response.rb', line 21 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status
21 22 23 |
# File 'lib/wsdl/http_response.rb', line 21 def status @status end |