Class: LlmClient::Response

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

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



10
11
12
# File 'lib/llm_client/http_client.rb', line 10

def body
  @body
end

#errorObject

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



10
11
12
# File 'lib/llm_client/http_client.rb', line 10

def error
  @error
end

#headersObject

Returns the value of attribute headers

Returns:

  • (Object)

    the current value of headers



10
11
12
# File 'lib/llm_client/http_client.rb', line 10

def headers
  @headers
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



10
11
12
# File 'lib/llm_client/http_client.rb', line 10

def status
  @status
end