Class: Chroma::APIOperations::Response

Inherits:
Struct
  • Object
show all
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

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



16
17
18
# File 'lib/chroma/api_operations/request.rb', line 16

def body
  @body
end

#errorObject

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



16
17
18
# File 'lib/chroma/api_operations/request.rb', line 16

def error
  @error
end

#headersObject

Returns the value of attribute headers

Returns:

  • (Object)

    the current value of headers



16
17
18
# File 'lib/chroma/api_operations/request.rb', line 16

def headers
  @headers
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



16
17
18
# File 'lib/chroma/api_operations/request.rb', line 16

def status
  @status
end