vibe.d beta banner
get vibe.d
0.7.30

Function download

Downloads a file from the specified URL.

Any redirects will be followed until the actual file resource is reached or if the redirection limit of 10 is reached. Note that only HTTP(S) is currently supported.

Prototypes

void download(HTTPClient_)(
  URL url,
  scope void delegate(scope InputStream) callback,
  HTTPClient_ client_ = null
);

void download(HTTPClient_)(
  string url,
  scope void delegate(scope InputStream) callback,
  HTTPClient_ client_ = null
);

void download()(
  string url,
  string filename
);

void download()(
  URL url,
  Path filename
);
Authors

Sönke Ludwig

Copyright

© 2012-2015 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.