headers() = [{binary(), iodata()}]
status() = non_neg_integer() | binary()
version() = {Major::non_neg_integer(), Minor::non_neg_integer()}
asctime_date/1 | Parse an asctime date. |
authorization/2 | Parse authorization value according rfc 2617. |
ce_identity/1 | Decode an identity content. |
conneg/2 | Parse a conneg header (Accept-Charset, Accept-Encoding), followed by an optional quality value. |
content_type/1 | Parse a content type. |
cookie_list/1 | Parse a list of cookies. |
cookie_to_iodata/3 | Convert a cookie name, value and options to its iodata form. |
digits/1 | Parse a list of digits as a non negative integer. |
entity_tag_match/1 | Parse either a list of entity tags or a "*". |
expectation/2 | Parse an expectation. |
http_date/1 | Parse an HTTP date (RFC1123, RFC850 or asctime date). |
language_range/2 | Parse a language range, followed by an optional quality value. |
list/2 | Parse a list of the given type. |
media_range/2 | Parse a media range. |
nonempty_list/2 | Parse a non-empty list of the given type. |
params/2 | Parse a list of parameters (a=b;c=d). |
quoted_string/2 | Parse a quoted string. |
rfc1123_date/1 | Parse an RFC1123 date. |
rfc850_date/1 | Parse an RFC850 date. |
te_chunked/2 | Decode a stream of chunks. |
te_identity/2 | Decode an identity stream. |
token/2 | Parse a token. |
token_ci/2 | Parse a case-insensitive token. |
urldecode/1 | Decode a URL encoded binary. |
urldecode/2 | Decode a URL encoded binary. |
urlencode/1 | URL encode a string binary. |
urlencode/2 | URL encode a string binary. |
version_to_binary/1 | Convert an HTTP version tuple to its binary form. |
whitespace/2 | Skip whitespace. |
x_www_form_urlencoded/1 |
asctime_date(Data::binary()) -> any()
Parse an asctime date.
authorization(UserPass::binary(), Type::binary()) -> {binary(), any()} | {error, badarg}
Parse authorization value according rfc 2617. Only Basic authorization is supported so far.
ce_identity(Data::binary()) -> {ok, binary()}
Decode an identity content.
conneg(Data::binary(), Fun::function()) -> any()
Parse a conneg header (Accept-Charset, Accept-Encoding), followed by an optional quality value.
content_type(Data::binary()) -> any()
Parse a content type.
cookie_list(Data::binary()) -> [{binary(), binary()}] | {error, badarg}
Parse a list of cookies.
We need a special function for this because we need to support both $; and $, as separators as per RFC2109.cookie_to_iodata(Name::iodata(), Value::iodata(), Opts::cowboy_req:cookie_opts()) -> iodata()
Convert a cookie name, value and options to its iodata form.
digits(Data::binary()) -> non_neg_integer() | {error, badarg}
Parse a list of digits as a non negative integer.
entity_tag_match(Data::binary()) -> any()
Parse either a list of entity tags or a "*".
expectation(Data::binary(), Fun::function()) -> any()
Parse an expectation.
http_date(Data::binary()) -> any()
Parse an HTTP date (RFC1123, RFC850 or asctime date).
language_range(Data::binary(), Fun::function()) -> any()
Parse a language range, followed by an optional quality value.
list(Data::binary(), Fun::function()) -> list() | {error, badarg}
Parse a list of the given type.
media_range(Data::binary(), Fun::function()) -> any()
Parse a media range.
nonempty_list(Data::binary(), Fun::function()) -> [any(), ...] | {error, badarg}
Parse a non-empty list of the given type.
params(Data::binary(), Fun::function()) -> any()
Parse a list of parameters (a=b;c=d).
quoted_string(X1::binary(), Fun::function()) -> any()
Parse a quoted string.
rfc1123_date(Data::binary()) -> any()
Parse an RFC1123 date.
rfc850_date(Data::binary()) -> any()
Parse an RFC850 date.
te_chunked(Bin, TransferState) -> more | {more, non_neg_integer(), Bin, TransferState} | {ok, Bin, Bin, TransferState} | {done, non_neg_integer(), Bin} | {error, badarg}
Decode a stream of chunks.
te_identity(Bin, TransferState) -> {more, non_neg_integer(), Bin, TransferState} | {done, Bin, non_neg_integer(), Bin}
Decode an identity stream.
token(Data::binary(), Fun::function()) -> any()
Parse a token.
token_ci(Data::binary(), Fun::function()) -> any()
Parse a case-insensitive token.
Changes all characters to lowercase.urldecode(Bin::binary()) -> binary()
Equivalent to urldecode(Bin, crash).
Decode a URL encoded binary.
urldecode(Bin::binary(), OnError::crash | skip) -> binary()
Decode a URL encoded binary.
The second argument specifies how to handle percent characters that are not
followed by two valid hex characters. Use skip
to ignore such errors,
if crash
is used the function will fail with the reason badarg
.
urlencode(Bin::binary()) -> binary()
Equivalent to urlencode(Bin, []).
URL encode a string binary.
urlencode(Bin::binary(), Opts::[noplus | upper]) -> binary()
URL encode a string binary.
The noplus
option disables the default behaviour of quoting space
characters, \s
, as +
. The upper
option overrides the default behaviour
of writing hex numbers using lowecase letters to using uppercase letters
instead.
version_to_binary(X1::version()) -> binary()
Convert an HTTP version tuple to its binary form.
whitespace(Data::binary(), Fun::function()) -> any()
Skip whitespace.
x_www_form_urlencoded(Qs::binary()) -> [{binary(), binary() | true}]
Generated by EDoc, Aug 16 2014, 11:28:18.