raxx v0.4.1 Raxx.Request

HTTP requests to a Raxx application are encapsulated in a Raxx.Request struct.

The contents are itemised below:

hostThe location of the hosting server, as a binary. e.g. www.example.com.
portThe connection port on the server, as an integer.
methodThe HTTP request method, such as “GET” or “POST”, as a binary. This cannot ever be an empty string, and is always uppercase.
pathThe remainder of the request URL’s “path”, split into segments. It designates the virtual “location” of the request’s target within the application. This may be an empty array, if the requested URL targets the application root.
queryThe query parameters from the URL search string, formatted as a map of strings.
headersThe headers from the HTTP request as a map of strings. Note all headers will be downcased, e.g. %{"content-type" => "text/plain"}
bodyThe body content sent with the request

Summary

Functions

Fetches and parse cookies from the request

Types

cookies :: %{optional(binary) => binary}
request :: %Raxx.Request{body: binary, headers: [{binary, binary}], host: binary, method: binary, path: [binary], port: :inet.port_number, query: %{optional(binary) => binary}}

Functions

parse_cookies(map)

Specs

parse_cookies(request) :: cookies

Fetches and parse cookies from the request.

split_path(path_string)