Module hackney_url

module to manage URLs.

Description

module to manage URLs.

Data Types

qs_opt()

qs_opt() = noplus | upper

qs_vals()

qs_vals() = [{binary() | atom() | list() | integer(), binary() | true}]

Function Index

fix_path/1
idnconvert_hostname/1
make_url/3Construct an URL from a base URL, a path and a list of properties to give to the URL.
normalize/1Normalizes the encoding of an URL.
normalize/2Normalizes the encoding of an URL.
parse_qs/1
parse_url/1Parse an URL and return a #hackney_url record.
pathencode/1Encode an URL path.
property/2
qs/1Encode query properties to binary.
qs/2Encode query properties to binary.
transport_scheme/1
unparse_url/1
urldecode/1Decode an URL encoded binary.
urldecode/2Decode an URL encoded binary.
urlencode/1URL encode a string binary.
urlencode/2URL encode a string binary.

Function Details

fix_path/1

fix_path(Path) -> any()

idnconvert_hostname/1

idnconvert_hostname(Host) -> any()

make_url/3

make_url(Url::binary(), Path::binary() | [binary()], Query::binary() | qs_vals()) -> binary()

Construct an URL from a base URL, a path and a list of properties to give to the URL.

normalize/1

normalize(URL) -> NormalizedUrl

Normalizes the encoding of an URL. Use the hackney_url:pathencode/1 to encode an URL.

normalize/2

normalize(URL, Fun) -> NormalizedUrl

Normalizes the encoding of an URL.

parse_qs/1

parse_qs(Bin::binary()) -> qs_vals()

parse_url/1

parse_url(URL::binary() | list()) -> hackney_url()

Parse an URL and return a #hackney_url record.

pathencode/1

pathencode(Path::binary() | list()) -> binary()

Equivalent to pathencode(Bin, []).

Encode an URL path.

property/2

property(X1, URL) -> any()

qs/1

qs(KVs::qs_vals()) -> binary()

Encode query properties to binary.

qs/2

qs(KVs::qs_vals(), Opts::[qs_opt()]) -> binary()

Encode query properties to binary. Opts are passed to urlencode/2

transport_scheme/1

transport_scheme(X1) -> any()

unparse_url/1

unparse_url(Hackney_url) -> any()

urldecode/1

urldecode(Bin::binary()) -> binary()

Equivalent to urldecode(Bin, crash).

Decode an URL encoded binary.

urldecode/2

urldecode(Bin::binary(), OnError::crash | skip) -> binary()

Decode an 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/1

urlencode(Bin::binary() | string()) -> binary()

URL encode a string binary.

urlencode/2

urlencode(Bin::binary() | string(), Opts::[qs_opt()]) -> binary()

URL encode a string binary. The noplus option disables the default behaviour of quoting space characters, \s, as +. The lower option overrides the default behaviour of writing hex numbers using uppercase letters to using lowercase letters instead.


Generated by EDoc