table of contents
other versions
- wheezy 1:15.b.1-dfsg-4+deb7u1
- wheezy-backports 1:17.3-dfsg-4~bpo70+1
- jessie 1:17.3-dfsg-4+deb8u1
- jessie-backports 1:19.2.1+dfsg-2~bpo8+1
- testing 1:19.2.1+dfsg-2
- unstable 1:19.2.1+dfsg-2
- experimental 1:19.3.1+dfsg-1
http_uri(3erl) | Erlang Module Definition | http_uri(3erl) |
NAME¶
http_uri - URI utility moduleDESCRIPTION¶
This module provides utility functions for working with URIs, according to RFC 3986.COMMON DATA TYPES ¶
Type definitions that are used more than once in this module:boolean() = true | false string() = list of ASCII characters
URI DATA TYPES ¶
Type definitions that are related to URI: For more information about URI, see RFC 3986.uri() = string() - Syntax according to the URI definition in rfc 3986, ex: "http://www.erlang.org/" user_info() = string() scheme() = atom() - Example: http, https host() = string() port() = pos_integer() path() = string() - Representing a file path or directory path query() = string()
EXPORTS¶
scheme_defaults() -> SchemeDefaults
Types:
SchemeDefaults = [{scheme(),
default_scheme_port_number()}]
default_scheme_port_number() = pos_integer()
This function provides a list of the scheme and their default port numbers
currently supported (by default) by this utility.
Types:
URI = uri()
Options = [Option]
Option = {ipv6_host_with_brackets, boolean()} | {scheme_defaults,
scheme_defaults()}]
Result = {Scheme, UserInfo, Host, Port, Path, Query}
UserInfo = user_info()
Host = host()
Port = pos_integer()
Path = path()
Query = query()
Reason = term()
This function is used to parse an URI. If no scheme defaults are provided, the
value of scheme_defaults function will be used.
Note that when parsing an URI with an unknown scheme (that is, a scheme not
found in the scheme defaults) a port number must be provided or else the
parsing will fail.
Types:
URI = uri()
HexEncodedURI = string() - Hex encoded uri
Hex encode an URI.
Types:
HexEncodedURI = string() - A possibly hex
encoded uri
URI = uri()
Decode a possibly hex encoded URI.
inets 5.9 | Ericsson AB |