http_range() = {First::non_neg_integer(), Last::non_neg_integer()} | {offset, Offset::non_neg_integer()} | {suffix, Length::pos_integer()}
async_send_chunk/2 | Send a chunk asynchronously. |
body/1 | Return the body . |
body_qs/1 | Parse application/x-www-form-urlencoded body into a proplist. |
chunk_ref/1 | Return a reference that can be used to send chunks to the client. |
close_chunk/1 | Explicitly close the chunked connection. |
get_arg/2 | Equivalent to get_arg(Key, Req, undefined). |
get_arg/3 | Equivalent to proplists:get_value(Key, Args, Default). |
get_arg_decoded/2 | Equivalent to get_arg_decoded(Key, Req, undefined). |
get_arg_decoded/3 | |
get_args/1 | Return a proplist of keys and values of the original query string. |
get_args_decoded/1 | |
get_header/2 | Equivalent to proplists:get_value(Key, Headers). |
get_header/3 | Equivalent to proplists:get_value(Key, Headers, Default). |
get_range/1 | Parse the Range header from the request. |
headers/1 | Return the headers . |
host/1 | Return the host . |
is_request/1 | |
method/1 | Return the method . |
path/1 | Return path split into binary parts. |
peer/1 | |
port/1 | Return the port . |
post_arg/2 | Equivalent to post_arg(Key, Req, undefined). |
post_arg/3 | |
post_arg_decoded/2 | Equivalent to post_arg_decoded(Key, Req, undefined). |
post_arg_decoded/3 | |
post_args/1 | |
post_args_decoded/1 | |
query_str/1 | Calculate the query string associated with a given Request
as a binary. |
raw_path/1 | Return the raw_path , i.e. |
scheme/1 | Return the scheme . |
send_chunk/2 | Send a chunk synchronously. |
to_proplist/1 | Serialize the Req uest record to a proplist. |
uri_decode/1 |
async_send_chunk(Ref, Data) -> any()
Send a chunk asynchronously.
body(Req) -> any()
Return the body
.
body_qs(Req) -> any()
Parse application/x-www-form-urlencoded
body into a proplist.
chunk_ref(Req) -> any()
Return a reference that can be used to send chunks to the client. If the protocol does not support it, return {error, not_supported}
.
close_chunk(Ref) -> any()
Equivalent to send_chunk(Ref, close)
.
Explicitly close the chunked connection. Return {error, closed}
if the client already closed the connection.
get_arg(Key, Req) -> any()
Equivalent to get_arg(Key, Req, undefined)
.
get_arg(Key, Req, Default) -> any()
Equivalent to proplists:get_value(Key, Args, Default)
.
get_arg_decoded(Key, Req) -> any()
Equivalent to get_arg_decoded(Key, Req, undefined)
.
get_arg_decoded(Key, Req, Default) -> any()
get_args(Req::elli:req()) -> QueryArgs::proplists:proplist()
Return a proplist of keys and values of the original query string. Both keys and values in the returned proplists will be binaries or the atom true
in case no value was supplied for the query value.
get_args_decoded(Req) -> any()
get_header(Key, Req) -> any()
Equivalent to proplists:get_value(Key, Headers)
.
get_header(Key, Req, Default) -> any()
Equivalent to proplists:get_value(Key, Headers, Default)
.
get_range(Req::elli:req()) -> [http_range()] | parse_error
Parse the Range
header from the request. The result is either a byte_range_set()
or the atom parse_error
. Use elli_util:normalize_range/2
to get a validated, normalized range.
headers(Req) -> any()
Return the headers
.
host(Req) -> any()
Return the host
.
is_request(Req) -> any()
method(Req) -> any()
Return the method
.
path(Req) -> any()
Return path
split into binary parts.
peer(Req) -> any()
port(Req) -> any()
Return the port
.
post_arg(Key, Req) -> any()
Equivalent to post_arg(Key, Req, undefined)
.
post_arg(Key, Req, Default) -> any()
post_arg_decoded(Key, Req) -> any()
Equivalent to post_arg_decoded(Key, Req, undefined)
.
post_arg_decoded(Key, Req, Default) -> any()
post_args(Req) -> any()
post_args_decoded(Req) -> any()
query_str(Req::elli:req()) -> QueryStr::binary()
Calculate the query string associated with a given Request
as a binary.
raw_path(Req) -> any()
Return the raw_path
, i.e. not split or parsed for query params.
scheme(Req) -> any()
Return the scheme
.
send_chunk(Ref, Data) -> any()
Send a chunk synchronously. If the referenced process is dead, return early with {error, closed}
, instead of timing out.
to_proplist(Req) -> any()
Serialize the Req
uest record to a proplist. Useful for logging.
uri_decode(Bin) -> any()