hackney_url (hackney v1.24.1)
View Sourcemodule to manage URLs.
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.
Encode an URL path.
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
Construct an URL from a base URL, a path and a list of properties to give to the URL.
-spec normalize(URL) -> NormalizedUrl when URL :: binary() | list() | hackney_url(), NormalizedUrl :: hackney_url().
Normalizes the encoding of an URL. Use the hackney_url:pathencode/1
to encode an URL.
-spec normalize(URL, Fun) -> NormalizedUrl when URL :: binary() | list() | hackney_url(), Fun :: fun(), NormalizedUrl :: hackney_url().
Normalizes the encoding of an URL.
-spec parse_url(URL :: binary() | list()) -> hackney_url().
Parse an URL and return a #hackney_url record.
Encode an URL path.
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.
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.