LlmCall.HTTP.Request (llm_call v0.1.0)

Copy Markdown View Source

One HTTP request, fully resolved by the client.

Summary

Functions

Builds a request for a GET.

Builds a request for a POST.

Types

method()

@type method() :: :get | :post

t()

@type t() :: %LlmCall.HTTP.Request{
  body: iodata() | nil,
  headers: [{String.t(), String.t()}],
  method: method(),
  receive_timeout: timeout(),
  url: String.t()
}

Functions

get(url, headers, receive_timeout)

@spec get(String.t(), [{String.t(), String.t()}], timeout()) :: t()

Builds a request for a GET.

post(url, headers, body, receive_timeout)

@spec post(String.t(), [{String.t(), String.t()}], iodata(), timeout()) :: t()

Builds a request for a POST.