Class: Chroma::APIOperations::Response
- Inherits:
-
Struct
- Object
- Struct
- Chroma::APIOperations::Response
- Defined in:
- lib/chroma/api_operations/request.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 or Net::HTTPResponse object if the response is not Net::HTTPSuccess
NOTE: Not supported yet by Ruby Next Response = Data.define(:status, :body, :headers, :error)
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
16 17 18 |
# File 'lib/chroma/api_operations/request.rb', line 16 def body @body end |
#error ⇒ Object
Returns the value of attribute error
16 17 18 |
# File 'lib/chroma/api_operations/request.rb', line 16 def error @error end |
#headers ⇒ Object
Returns the value of attribute headers
16 17 18 |
# File 'lib/chroma/api_operations/request.rb', line 16 def headers @headers end |
#status ⇒ Object
Returns the value of attribute status
16 17 18 |
# File 'lib/chroma/api_operations/request.rb', line 16 def status @status end |