View Source hackney_url (hackney v1.23.0)
Summary
Functions
Construct an URL from a base URL, a path and a list of properties to give to the URL.
Normalizes the encoding of an URL. Use the
hackney_url:pathencode/1
to encode an URL.Normalizes the encoding of an URL.
Parse an URL and return a #hackney_url record.
Equivalent to pathencode(Bin, []).
Encode query properties to binary.
Encode query properties to binary. Opts are passed to
urlencode/2
Equivalent to urldecode(Bin, crash).
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
.URL encode a string 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.Types
-type qs_opt() :: noplus | upper.
Functions
-spec normalize(URL) -> NormalizedUrl when URL :: binary() | list() | hackney_url(), NormalizedUrl :: hackney_url().
hackney_url:pathencode/1
to encode an URL.
-spec normalize(URL, Fun) -> NormalizedUrl when URL :: binary() | list() | hackney_url(), Fun :: fun(), NormalizedUrl :: hackney_url().
-spec parse_url(URL :: binary() | list()) -> hackney_url().
Equivalent to pathencode(Bin, []).
Encode an URL path.urlencode/2
Equivalent to urldecode(Bin, crash).
Decode an URL encoded binary.skip
to ignore such errors, if crash
is used the function will fail with the reason badarg
.
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.