| body/1 | Parses an HTTP request body, assuming it is in form POST format. |
| header_field/1 | Parses a single, well-formed HTTP header. |
| hostport/1 | Given a host and port both in a string like
"www.foo.bar:1234", returns the host and
port as seperate strings. |
| http_version/1 | Given an HTTP version string, returns the major and minor version numbers as seperate strings. |
| request_line/1 | Parses a well-formed HTTP request line. |
| unescape_hex/1 | Unescapes the hex sequences in URI and/or form data. |
| uri/1 | Returns basic request and arguments given a URI. |
body(Body::string()) -> [{string(), string()}]
Parses an HTTP request body, assuming it is in form POST format.
header_field(Line::string()) -> {key(), [{key(), value()}]}
Parses a single, well-formed HTTP header.
Actually this is only for the kinds that work like
Key: Value;key=value;key=value, also supporting
quoted strings. However, most of the headers we're concerned
with parsing look enough like this for now. TODO write
different parsers for different kinds of headers.
hostport(HostPort::string()) -> {string(), string()}
Given a host and port both in a string like
"www.foo.bar:1234", returns the host and
port as seperate strings. The host is always returned
in lowercase.
http_version(X1::string()) -> {string(), string()}
Given an HTTP version string, returns the major and minor version numbers as seperate strings.
request_line(Request::string()) -> {Host, Port, Request0, Major, Minor, Method, URI, Root, Args, ArgList}
Parses a well-formed HTTP request line.
unescape_hex(H::string()) -> string()
Unescapes the hex sequences in URI and/or form data.
uri(URI::string()) -> {string(), string(), string(), string(), [{string(), string()}]}
Returns basic request and arguments given a URI.
{Host, Port, Root, ArgString, Args}.