class

Anthropic::APIResponse

Inherits Reference < Object

A raw HTTP response surfaced to middleware. Carries every status code; middleware must inspect status to react to errors.

Constructors

new(status : Int32, headers : HTTP::Headers, body : String, request : APIRequest | Nil = nil)
Source

Instance methods

body
Source
headers
Source
parse(type : T.class) : T forall T

Parse the body as the SDK-typed result. Buffers nothing (body is already materialized for the non-streaming path).

Source
request
Source
status
Source
success?
Source