Copyright © (C) 2015-2020, Jan Henry Nystrom <JanHenryNystrom@gmail.com> -------------------------------------------------------------------
Authors: Jan Henry Nystrom (JanHenryNystrom@gmail.com).
opt() = none
uri() = #uri{}
decode/1 | Decodes the binary into a structured Erlang term. |
decode/2 | Decodes the binary into a structured Erlang. |
encode/1 | Encodes the structured Erlang term as an iolist. |
encode/2 | Encodes the structured Erlang term as an iolist or binary. |
decode(Binary::binary()) -> uri()
Decodes the binary into a structured Erlang term. Equivalent of decode(Binary, []) -> URI.
decode(Binary::binary(), Opts::[opt()] | #opts{format = ipv4 | ipv6, ipv6ipv4 = boolean(), compact = boolean(), return_type = iolist | binary}) -> uri()
Decodes the binary into a structured Erlang. Decode will give an exception if the binary is not well formed URI. Options are:
encode(Term::uri()) -> iolist()
Encodes the structured Erlang term as an iolist. Equivalent of encode(Term, []) -> URI.
encode(Term::uri(), Opts::[opt()] | #opts{format = ipv4 | ipv6, ipv6ipv4 = boolean(), compact = boolean(), return_type = iolist | binary}) -> iolist() | binary()
Encodes the structured Erlang term as an iolist or binary. Encode will give an exception if the erlang term is not well formed. Options are: binary -> a binary is returned list -> a flat list is returned iolist -> a iolist is returned ipv4 -> an ipv4 address is encoded when the Host is an integer ipv6 -> an ipv6 address is encoded when the Host is an integer ipv6ipv4 -> encoded IPv6 host address has the two least sigificant segments repesented in IPv4 address format compact -> the most compact encoding of IPv6 used (collapsed zeros)
Generated by EDoc