Module bookish_spork_request

Data Types

t()

abstract datatype: t()

Function Index

body/1request body.
content_length/1Content-Length header value as intger.
from_transport/1
header/2Returns a particular header from request.
headers/1http headers map.
is_keepalive/1tells you if the request is keepalive or not https://tools.ietf.org/html/rfc6223
method/1http verb: 'GET', 'POST','PUT', 'DELETE', 'OPTIONS', ...
transport/1
uri/1path with query string.
version/1http protocol version tuple.

Function Details

body/1

body(Request::t()) -> binary()

request body

content_length/1

content_length(Request::t()) -> integer()

Content-Length header value as intger

from_transport/1

from_transport(Transport::bookish_spork_transport:t()) -> t()

header/2

header(Request::t(), HeaderName::string()) -> string() | nil

Returns a particular header from request. Header name is lowerced

headers/1

headers(Request::t()) -> map()

http headers map. Header names are normalized and lowercased

is_keepalive/1

is_keepalive(Request::t()) -> boolean()

tells you if the request is keepalive or not https://tools.ietf.org/html/rfc6223

method/1

method(Request::t()) -> atom()

http verb: 'GET', 'POST','PUT', 'DELETE', 'OPTIONS', ...

transport/1

transport(X1) -> any()

uri/1

uri(Request::t()) -> binary() | nil

path with query string

version/1

version(Request::t()) -> tuple() | nil

http protocol version tuple. Most often would be {1, 1}


Generated by EDoc