ubyte[] getRaw(string url)

GET request to raw content.

Returns

Byte array.

T[] post(T = char)(const(char)[] url, string[string] postDict, HTTP conn = HTTP()) 
if(is(T == char) || is(T == ubyte))

POST request.

ubyte[] postRaw(const(char)[] url, string[string] postDict, HTTP c = HTTP())

POST request to get an answer with raw content.

Returns

Byte array.

string[string] getHeaders(in char[] url)

Gets HTTP response headers by URL.

string getContentType(in char[] url)

Gets HTTP content type by URL.

string getCharset(const(char)[] url)

Gets content charset (possibly empty) by URL.

bool isLinkToHTML(string url)

Checks if the URL is a link to HTML page.

UniString getPage(string url)

Get text content as amalthea.encoding.UniString by URL. The implementation of 'get' from the standard library is taken as a basis.

auto getElementsByTag(string html, string tag)

This function searches all elements from HTML page with a specific tag.

auto getElementsByTagAndAttribute(
    string html, 
    string tag, 
    string attrName = "", 
    string attrValue = ""
)

This function searches all elements by a specific tag and an attribute.

Returns

Page element info (tag name and possible attributes) and content of the element as tuple with two elements.

string getHTMLPageTitle(string address)

This function returns title of Internet-page.

ref string replaceSpecialMnemonics(return ref string HTMLText)

Search and replace special characters in HTML for normal view.

Public imports

Some useful functions based on std.net.curl.