Module bookish_spork_request

Data Types

socket()

socket() = gen_tcp:socket() | ssl:sslsocket()

t()

abstract datatype: t()

Function Index

body/1request body.
content_length/1Content-Length header value as intger.
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', ...
new/3creates request with ssl info if socket is an ssl socket.
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

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', ...

new/3

new(ConnectionId, Socket, TlsExt) -> Request

creates request with ssl info if socket is an ssl socket

uri/1

uri(Request::t()) -> string()

path with query string

version/1

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

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


Generated by EDoc