Class: CoreLibrary::HttpResponse
- Inherits:
-
Object
- Object
- CoreLibrary::HttpResponse
- Defined in:
- lib/apimatic-core/http/response/http_response.rb
Overview
Http response received.
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#raw_body ⇒ Object
readonly
Returns the value of attribute raw_body.
-
#reason_phrase ⇒ Object
readonly
Returns the value of attribute reason_phrase.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(status_code, reason_phrase, headers, raw_body, request) ⇒ HttpResponse
constructor
The constructor.
Constructor Details
#initialize(status_code, reason_phrase, headers, raw_body, request) ⇒ HttpResponse
The constructor
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/apimatic-core/http/response/http_response.rb', line 12 def initialize(status_code, reason_phrase, headers, raw_body, request) @status_code = status_code @reason_phrase = reason_phrase @headers = headers @raw_body = raw_body @request = request end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
4 5 6 |
# File 'lib/apimatic-core/http/response/http_response.rb', line 4 def headers @headers end |
#raw_body ⇒ Object (readonly)
Returns the value of attribute raw_body.
4 5 6 |
# File 'lib/apimatic-core/http/response/http_response.rb', line 4 def raw_body @raw_body end |
#reason_phrase ⇒ Object (readonly)
Returns the value of attribute reason_phrase.
4 5 6 |
# File 'lib/apimatic-core/http/response/http_response.rb', line 4 def reason_phrase @reason_phrase end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
4 5 6 |
# File 'lib/apimatic-core/http/response/http_response.rb', line 4 def request @request end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
4 5 6 |
# File 'lib/apimatic-core/http/response/http_response.rb', line 4 def status_code @status_code end |