struct

Anthropic::RequestOptions

Inherits Struct < Value < Object

Per-request options that override client-level configuration.

Constructors

new(timeout : Time::Span | Nil = nil, retry_policy : RetryPolicy | Nil = nil, beta_headers : Array(String) | Nil = nil, extra_headers : HTTP::Headers | Nil = nil, extra_body : Hash(String, JSON::Any) | Nil = nil, extra_query : Hash(String, String) | Nil = nil)
Source

Instance methods

beta_headers

Returns a copy of the beta headers to prevent external mutation.

Source
extra_body

Returns a copy of the extra body fields to prevent external mutation. These fields are merged into the request body JSON with lower precedence than typed request fields (existing keys are not overwritten).

Source
extra_headers

Returns a copy of the extra headers to prevent external mutation.

Source
extra_query

Returns a copy of the extra query params to prevent external mutation. These params are merged into GET request URLs with lower precedence than params already embedded in the path.

Source
retry_policy
Source
timeout
Source