Starship.Reactor.Conn (Starship v0.0.1) View Source

The connection struct for the Starship Webserver.

Link to this section Summary

Types

The body of an HTTP request

An HTTP header

HTTP header list

The HTTP version of a request

The parsed query of an HTTP request

t()

A connection struct for an HTTP request made to the server.

Link to this section Types

Specs

body() :: binary()

The body of an HTTP request

Specs

header() :: {binary(), binary()}

An HTTP header

Specs

headers() :: [header()]

HTTP header list

Specs

http_version() ::
  :"HTTP/0.9" | :"HTTP/1.0" | :"HTTP/1.1" | :"HTTP/2.0" | :"HTTP/3.0"

The HTTP version of a request

Specs

query() :: map()

The parsed query of an HTTP request

Specs

t() :: %Starship.Reactor.Conn{
  body: body(),
  headers: headers(),
  http_version: http_version(),
  method: Starship.Reactor.Conn.Method.t(),
  path: binary(),
  query: query()
}

A connection struct for an HTTP request made to the server.

This defines all parts of the connection made to the server.

Link to this section Functions

Specs

http_method(binary()) ::
  {:ok, Starship.Reactor.Conn.Method.t()} | {:error, Exception.t()}

Specs

http_version(binary()) :: {:ok, http_version()} | {:error, Exception.t()}