download

HTTP/FTP download to local file system.

void
download
(
Conn = AutoProtocol
)
(
const(char)[] url
,
string saveToPath
,
Conn conn = Conn()
)
if (
isCurlConn!Conn
)

Parameters

url const(char)[]

resource to download

saveToPath string

path to store the downloaded content on local disk

conn Conn

connection to use e.g. FTP or HTTP. The default AutoProtocol will guess connection type and create a new instance for this call only.

Examples

import std.net.curl;
download("https://httpbin.org/get", "/tmp/downloaded-http-file");

Meta