A request, shaped like the Fetch API's Request so the routes read as the
TypeScript SDK's do: an absolute URL, a method, headers, and the body as
text. Runlight.Plug makes one from a Plug.Conn; a test or another
server can make one with new/2.
remote_address is the address the connection came from, used for the
visitor's daily hash and the rate limit when no trusted proxy header names
the client.
Summary
Functions
A header's value, every one joined with ", ", or nil.
The body as JSON: {:ok, value} or :error, as request.json() resolves or rejects.
A request for url (absolute). Options: :method (default "GET"),
:headers (a map or list of pairs), :body (text), and
:remote_address.
The body as text.
The parsed URL.
The same request with other parts, as new Request(request, init) makes one.
Types
Functions
A header's value, every one joined with ", ", or nil.
The body as JSON: {:ok, value} or :error, as request.json() resolves or rejects.
A request for url (absolute). Options: :method (default "GET"),
:headers (a map or list of pairs), :body (text), and
:remote_address.
The body as text.
@spec url(t()) :: Runlight.Url.t()
The parsed URL.
The same request with other parts, as new Request(request, init) makes one.