headers() = term()
key() = binary() | string()
value() = binary() | {binary() | [{binary(), binary()} | binary()]}
append/3 | append a new value to the list of value for the the header field if the key has not been recorded the list will be created with the value as the first item. |
delete/2 | delete a field from headers. |
fold/3 | |
from_list/1 | create headers from a list. |
get_value/2 | get the first value of an headers or return undefined. |
get_value/3 | get the first value of an headers or return the default. |
is_key/2 | is the header field exists or no. |
lookup/2 | |
merge/2 | merge 2 headers objects. |
new/0 | initialize an empty headers objecy. |
new/1 | |
parse_content_type/1 | |
parse_media_type/2 | Parse a media type. |
size/1 | return the number of headers fields. |
store/2 | store a list of headers. |
store/3 | replace the content of the header field with the value or the list of values. |
store_new/3 | only store a value if the key exist. |
to_binary/1 | transform headers to a binary that can be used to construct a request. |
to_iolist/1 | convert headers to an iolist. |
to_list/1 | convert headers to a list. |
append a new value to the list of value for the the header field if the key has not been recorded the list will be created with the value as the first item.
delete a field from headers.
fold(Fun, Acc, X3) -> any()
from_list(HeadersList::headers_list()) -> headers()
create headers from a list
get the first value of an headers or return undefined
get the first value of an headers or return the default
is the header field exists or no
lookup(Key, X2) -> any()
merge 2 headers objects. If a key is already existing in HEader1, it will be kept.
new() -> headers()
initialize an empty headers objecy
new(H::headers_list() | headers()) -> headers()
parse_content_type(Data::binary()) -> any()
parse_media_type(Data::binary(), Fun::function()) -> any()
Parse a media type.
size(X1::headers()) -> non_neg_integer()
return the number of headers fields
store(KVs::headers_list(), Headers::headers()) -> headers()
store a list of headers. Replacing oldest
replace the content of the header field with the value or the list of values.
only store a value if the key exist.
to_binary(Headers::headers()) -> binary()
transform headers to a binary that can be used to construct a request
to_iolist(Headers::headers()) -> iolist()
convert headers to an iolist. Useful to send them over the wire.
to_list(Headers::headers()) -> headers_list()
convert headers to a list