From 7e5d062973e7cb4f9ee949529e9dcdb5785c1304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Dimitrov?= Date: Mon, 6 Nov 2017 09:54:12 +0100 Subject: stdlib: Remove compose_query and dissect_query compose_query/{1,2} and dissect_query/1 removed as the implemented specification (HTML 2.0) is old. They will be re-implemented based on HTML5. --- lib/stdlib/doc/src/uri_string.xml | 87 +-------------------------------------- 1 file changed, 1 insertion(+), 86 deletions(-) (limited to 'lib/stdlib/doc/src/uri_string.xml') diff --git a/lib/stdlib/doc/src/uri_string.xml b/lib/stdlib/doc/src/uri_string.xml index 8fa2a92370..9ace2b0a05 100644 --- a/lib/stdlib/doc/src/uri_string.xml +++ b/lib/stdlib/doc/src/uri_string.xml @@ -31,8 +31,7 @@ URI processing functions.

This module contains functions for parsing and handling URIs - (RFC 3986) and - form-urlencoded query strings (RFC 1866). + (RFC 3986).

A URI is an identifier consisting of a sequence of characters matching the syntax rule named URI in RFC 3986. @@ -72,13 +71,6 @@ Transforming URIs into a normalized form

normalize/1
- Composing form-urlencoded query strings from a list of key-value pairs

- compose_query/1

- compose_query/2 -
- Dissecting form-urlencoded query strings into a list of key-value pairs

- dissect_query/1 -

There are four different encodings present during the handling of URIs:

@@ -110,14 +102,12 @@

Error tuple indicating the type of error. Possible values of the second component:

- invalid_character invalid_input invalid_map invalid_percent_encoding invalid_scheme invalid_uri invalid_utf8 - missing_value

The third component is a term providing additional information about the cause of the error.

@@ -143,81 +133,6 @@ - - - Compose urlencoded query string. - -

Composes a form-urlencoded QueryString based on a - QueryList, a list of non-percent-encoded key-value pairs. - Form-urlencoding is defined in section - 8.2.1 of RFC 1866 - (HTML 2.0) for media type application/x-www-form-urlencoded. - Reserved and unsafe characters, as - defined by RFC 1738 - (Uniform Resource Locators), are percent-encoded.

-

See also the opposite operation - dissect_query/1. -

-

Example:

-
-1> uri_string:compose_query([{"foo bar","1"},{"city","örebro"}]).
-
-2> >,<<"1">>},
-2> {<<"city">>,<<"örebro"/utf8>>}]).]]>
->]]>
-	
-
-
- - - - Compose urlencoded query string. - -

Same as compose_query/1 but with an additional - Options parameter, that controls the type of separator used - between key-value pairs. There are three supported separator types: amp (), escaped_amp () and semicolon (;). If the parameter Options is empty, separator takes the default value (escaped_amp).

-

See also the opposite operation - dissect_query/1. -

-

Example:

-
-1> uri_string:compose_query([{"foo bar","1"},{"city","örebro"}],
-1> [{separator, amp}]).
- uri_string:compose_query([{<<"foo bar">>,<<"1">>},
-2> {<<"city">>,<<"örebro"/utf8>>}], [{separator, escaped_amp}]).]]>
->]]>
-	
-
-
- - - - Dissect query string. - -

Dissects an urlencoded QueryString and returns a - QueryList, a list of non-percent-encoded key-value pairs. - Form-urlencoding is defined in section - 8.2.1 of RFC 1866 - (HTML 2.0) for media type application/x-www-form-urlencoded. - Percent-encoded segments are decoded as defined by - RFC 1738 - (Uniform Resource Locators).

-

Supported separator types: amp (), escaped_amp - () and semicolon (;).

-

See also the opposite operation - compose_query/1. -

-

Example:

-
-1> uri_string:dissect_query("foo+bar=1;city=%C3%B6rebro").
-[{"foo bar","1"},{"city","örebro"}]
-2> >).]]>
->,<<"1">>},{<<"city">>,<<"örebro"/utf8>>}] ]]>
-	
-
-
- Syntax-based normalization. -- cgit v1.2.3