Class: LlmClient::Response
- Inherits:
-
Struct
- Object
- Struct
- LlmClient::Response
- Defined in:
- lib/llm_client/http_client.rb
Overview
Request’s response Data object.
status - HTTP status code. It is zero when a request fails due to network error. body - Parsed JSON object or response body. headers - HTTP response headers. error - Exception if the response is not success
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#error ⇒ Object
Returns the value of attribute error.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body
10 11 12 |
# File 'lib/llm_client/http_client.rb', line 10 def body @body end |
#error ⇒ Object
Returns the value of attribute error
10 11 12 |
# File 'lib/llm_client/http_client.rb', line 10 def error @error end |
#headers ⇒ Object
Returns the value of attribute headers
10 11 12 |
# File 'lib/llm_client/http_client.rb', line 10 def headers @headers end |
#status ⇒ Object
Returns the value of attribute status
10 11 12 |
# File 'lib/llm_client/http_client.rb', line 10 def status @status end |