GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  HTTP_URI (3)

NAME

http_uri - URI utility module

CONTENTS

Description
Exports

DESCRIPTION

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

DATA TYPES

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

boolean() = true | false

string() = list of ASCII characters

URI DATA TYPES

Type definitions that are related to URI:

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.

EXPORTS

decode(HexEncodedURI) -> URI

Types:

HexEncodedURI = string() - A possibly hexadecimal encoded URI
URI = uri()

Decodes a possibly hexadecimal encoded URI.

encode(URI) -> HexEncodedURI

Types:

URI = uri()
HexEncodedURI = string() - Hexadecimal encoded URI

Encodes a hexadecimal encoded URI.

parse(URI) -> {ok, Result} | {error, Reason}
parse(URI, Options) -> {ok, Result} | {error, Reason}

Types:

URI = uri()
Options = [Option]
Option = {ipv6_host_with_brackets, boolean()} | {scheme_defaults, scheme_defaults()} | {fragment, boolean()} | {schema_validation_fun, fun()}]
Result = {Scheme, UserInfo, Host, Port, Path, Query} | {Scheme, UserInfo, Host, Port, Path, Query, Fragment}
UserInfo = user_info()
Host = host()
Port = pos_integer()
Path = path()
Query = query()
Fragment = fragment()
Reason = term()

Parses a URI. If no scheme defaults are provided, the value of the scheme_defaults function is used.

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 is returned as part of the parsing result, otherwise it is ignored.

Scheme validation fun is to be defined as follows:

fun(SchemeStr :: string()) ->         valid | {error, Reason :: term()}.         

It is called before scheme string gets converted into scheme atom and thus possible atom leak could be prevented

scheme_defaults() -> SchemeDefaults

Types:

SchemeDefaults = [{scheme(), default_scheme_port_number()}]
default_scheme_port_number() = pos_integer()

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

Search for    or go to Top of page |  Section 3 |  Main Index


Ericsson AB HTTP_URI (3) inets 6.2

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.