From a2a1883e04aaa923b385cbbc496395ed5bf1dc17 Mon Sep 17 00:00:00 2001 From: tmanevik Date: Mon, 6 Jul 2015 21:21:27 +0200 Subject: Inets Reference Manual Editorial changes --- lib/inets/doc/src/http_uri.xml | 96 +++++++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 44 deletions(-) (limited to 'lib/inets/doc/src/http_uri.xml') diff --git a/lib/inets/doc/src/http_uri.xml b/lib/inets/doc/src/http_uri.xml index c71bfbd686..47c40da96a 100644 --- a/lib/inets/doc/src/http_uri.xml +++ b/lib/inets/doc/src/http_uri.xml @@ -35,38 +35,45 @@

This module provides utility functions for working with URIs, - according to RFC 3986.

- + according to + RFC 3986.

- COMMON DATA TYPES + DATA TYPES

Type definitions that are used more than once in this module:

- +

boolean() = true | false

+

string() = list of ASCII characters

- URI DATA TYPES + URI DATA TYPES

Type definitions that are related to URI:

-

For more information about URI, see RFC 3986.

- - - + + + uri() = string() +

Syntax according to the URI definition in RFC 3986, + for example, "http://www.erlang.org/"

+ user_info() = string() +

+ scheme() = atom() +

Example: http, https

+ host() = string() +

+ port() = pos_integer() +

+ path() = string() +

Represents a file path or directory path

+ query() = string() +

+ fragment() = string() +

+
+ +

For more information about URI, see + RFC 3986.

@@ -74,28 +81,28 @@ fragment() = string() decode(HexEncodedURI) -> URI - Decode a hex encoded URI + Decodes a hexadecimal encoded URI. - HexEncodedURI = string() - A possibly hex encoded uri + HexEncodedURI = string() - A possibly hexadecimal encoded URI URI = uri() -

Decode a possibly hex encoded URI.

+

Decodes a possibly hexadecimal encoded URI.

encode(URI) -> HexEncodedURI - Hex encode an URI + Encodes a hexadecimal encoded URI. URI = uri() - HexEncodedURI = string() - Hex encoded uri + HexEncodedURI = string() - Hexadecimal encoded URI -

Hex encode an URI.

+

Encodes a hexadecimal encoded URI.

@@ -104,10 +111,10 @@ fragment() = string() parse(URI) -> {ok, Result} | {error, Reason} parse(URI, Options) -> {ok, Result} | {error, Reason} - Parse an URI + Parses a URI. - URI = uri() - Options = [Option] + URI = uri() + Options = [Option] Option = {ipv6_host_with_brackets, boolean()} | {scheme_defaults, scheme_defaults()} | {fragment, boolean()}] @@ -119,20 +126,20 @@ fragment() = string() Path = path() Query = query() Fragment = fragment() - Reason = term() + Reason = term() -

This function is used to parse an URI. If no scheme defaults - are provided, the value of +

Parses a URI. If no scheme defaults + are provided, the value of the scheme_defaults - function will be used.

+ function is used.

-

Note that when parsing an URI with an unknown scheme (that is, - a scheme not found in the scheme defaults) a port number must be - provided or else the parsing will fail.

+

When parsing a URI with an unknown scheme (that is, + a scheme not found in the scheme defaults), a port number must be + provided, otherwise the parsing fails.

-

If the fragment option is true, the URI fragment will be returned as - part of the parsing result, otherwise it is completely ignored.

+

If the fragment option is true, the URI fragment is returned as + part of the parsing result, otherwise it is ignored.

@@ -140,14 +147,14 @@ fragment() = string() scheme_defaults() -> SchemeDefaults - A list of scheme and their default ports + A list of the scheme and their default ports. SchemeDefaults = [{scheme(), default_scheme_port_number()}] default_scheme_port_number() = pos_integer() -

This function provides a list of the scheme and their default - port numbers currently supported (by default) by this utility.

+

Provides a list of the scheme and their default + port numbers supported (by default) by this utility.

@@ -160,7 +167,8 @@ fragment() = string()