Finch.Request (Finch v0.7.0) View Source

A request struct.

Link to this section Summary

Types

Optional request body.

Request headers.

An HTTP request method represented as an atom() or a String.t().

t()

A Uniform Resource Locator, the address of a resource on the Web.

Link to this section Types

Specs

body() :: iodata() | {:stream, Enumerable.t()} | nil

Optional request body.

Specs

headers() :: Mint.Types.headers()

Request headers.

Specs

method() ::
  :get | :post | :head | :patch | :delete | :options | :put | String.t()

An HTTP request method represented as an atom() or a String.t().

The following atom methods are supported: :get, :post, :put, :patch, :delete, :head, :options. You can use any arbitrary method by providing it as a String.t().

Specs

t() :: %Finch.Request{
  body: term(),
  headers: term(),
  host: term(),
  method: term(),
  path: term(),
  port: term(),
  query: term(),
  scheme: term()
}

Specs

url() :: String.t() | URI.t()

A Uniform Resource Locator, the address of a resource on the Web.