Documentation

Net

Namespace

Networking and sockets.

class Net::HttpRequest

Holds the state of an executing HTTP request.

class Net::FormPair

Key value pair returned by Net::ParseUrlEncodedForm.

class Net::Socket

A non-blocking TCP socket.

HttpRequest@ Net::HttpGet(const string&in url)

Creates an HTTP GET request to the given URL and automatically starts the request.

HttpRequest@ Net::HttpHead(const string&in url)

Creates an HTTP HEAD request to the given URL and automatically starts the request.

HttpRequest@ Net::HttpDelete(const string&in url)

Creates an HTTP DELETE request to the given URL and automatically starts the request.

string Net::UrlEncode(const string&in str)

URL encode a string.

Returns string
string Net::UrlDecode(const string&in str)

URL decode a string.

Returns string
FormPair[]@ Net::ParseUrlEncodedForm(const string&in input)

Parses a list of key-value pairs encoded as application/x-www-form-urlencoded as specified by WHATWG's URL living standard. This can be used for URL query strings as well.

string Net::WriteUrlEncodedForm(const FormPair[]&in pairs)

Serializes a list of key-value pairs to application/x-www-form-urlencoded as specified by WHATWG's URL living standard. This can be used for URL query strings as well.

Returns string