AshHooks.Http.Request (AshHooks v3.3.0)

Copy Markdown View Source

A complete HTTP/1.1 request prepared before host signing.

target preserves the URL's escaped path and query, with / for an empty path. headers contains every line in wire order, including authority, framing, content type and connection close. An adapter implementing send_prepared/2 must send these values unchanged, adding no header lines.

Summary

Functions

Builds the complete ordered request without resolving its destination.

Types

t()

@type t() :: %AshHooks.Http.Request{
  body: binary(),
  headers: [{String.t(), String.t()}],
  method: String.t(),
  target: String.t(),
  url: String.t()
}

Functions

new(method, url, headers, body)

@spec new(atom() | String.t(), String.t(), map(), binary()) ::
  {:ok, t()} | {:error, atom()}

Builds the complete ordered request without resolving its destination.