Copyright © 2016
Authors: Gavin M. Roy (gavinmroy@gmail.com).
authority() = {userinfo(), host(), inet:port_number()}
fragment() = string() | undefined
hexcase() = uppercase | lowercase
host() = string()
password() = string() | undefined
path() = string()
query() = [tuple() | string()] | undefined
scheme() = http | https | atom()
uri() = {scheme(), authority(), path(), query(), fragment()}
url() =
{scheme(),
username(),
password(),
host(),
inet:port_number(),
path(),
query(),
fragment()}
userinfo() = {username(), password()} | undefined
username() = string() | undefined
| build/1 | Build a URI. |
| parse/1 | Parse a URI. |
| parse/2 | Parse a URI, returning the result as either a uri() or url(). |
| percent_decode/1 | Decode a percent encoded string value. |
| percent_encode/1 | Percent encode a string value. |
| percent_encode/2 | Percent encode a string value. |
| plus_decode/1 | Decode a percent encoded string value that uses pluses for spaces. |
| plus_encode/1 | Percent encode a string value similar to encode/1, but encodes spaces with a
plus (+) instead of %20. |
| plus_encode/2 | Percent encode a string value similar to encode/1, but encodes spaces with a
plus (+) instead of %20. |
Build a URI
parse(Value :: string()) -> uri() | {error, Reason :: term()}
Parse a URI
Returns either the URI or an error term.parse(Value :: string(), Return :: uri | url) ->
uri() | {error, Reason :: term()}
Parse a URI, returning the result as either a uri() or url().
percent_decode(Value :: string()) -> string()
Decode a percent encoded string value.
percent_encode(Value :: string()) -> string()
Percent encode a string value. Note that this will return hexidecimal
values in lowercase. If you need uppercase values, invoke percent_encode/2
with the second parameter as the value upercase.
percent_encode(Value :: string(), X2 :: hexcase()) -> string()
Percent encode a string value.
When lowercase is passed, hexidecimal strings with A-F values in them are returned as lowercase. Likewise, the uppercase value will encode hexidecimal strings as uppercase values.plus_decode(Value :: string()) -> string()
Decode a percent encoded string value that uses pluses for spaces.
Note: The use of plus for space is defined in RFC-1630 but does not appear in RFC-3986.plus_encode(Value :: string()) -> string()
Percent encode a string value similar to encode/1, but encodes spaces with a
plus (+) instead of %20. This function can be used for encoding query arguments.
plus_encode(Value :: string(), X2 :: hexcase()) -> string()
Percent encode a string value similar to encode/1, but encodes spaces with a
plus (+) instead of %20. This function can be used for encoding query arguments.
When lowercase is passed, hexidecimal strings with A-F values in them are returned
as lowercase. Likewise, the uppercase value will encode hexidecimal strings as
uppercase values.
Generated by EDoc