Network

Base interface for basic network operations.

Members

Functions

downloadFile
void downloadFile(string url, string target)

Download file located at the indicated URL, unless the target file already exists.

getFile
ubyte[] getFile(string url)

Get resource located at the indicated URL.

httpRequest
HttpResponse httpRequest(HttpRequest request)

Perform a HTTP request.

post
ubyte[] post(string url, const(ubyte)[] data)

Post data to the specified URL.

resolveRedirect
string resolveRedirect(string url)

Get the destination of an HTTP redirect.

urlOK
bool urlOK(string url)

Check if the resource exists and is downloadable. E.g. the HTTP status code for a HEAD request should be 200.

Meta