OpenrouterSdk.Client.Request (OpenRouter SDK v0.1.0)

Copy Markdown View Source

internal request representation.

shared by buffered and streaming calls. middleware sees this struct before it's serialized into a finch request.

Summary

Types

body()

@type body() ::
  nil
  | iodata()
  | {:json, term()}
  | {:multipart, list()}
  | {:stream, Enumerable.t()}

method()

@type method() :: :get | :post | :put | :patch | :delete

t()

@type t() :: %OpenrouterSdk.Client.Request{
  accept: :json | :sse | :binary,
  body: body(),
  headers: [{String.t(), String.t()}],
  method: method(),
  opts: keyword(),
  path: String.t(),
  query: keyword() | map()
}