Download a file into array (using std.net.curl.download)
MoonlightSentinel
moonlightsentinel at disroot.org
Mon Jul 5 15:08:45 UTC 2021
On Monday, 5 July 2021 at 14:57:20 UTC, BoQsc wrote:
> Let's say I can't store information into files.
> Is it possible to download a file into an array.
Yes, use [`get`](https://dlang.org/phobos/std_net_curl.html#.get):
```d
import std.net.curl;
void main()
{
char[] content =
get("https://gist.githubusercontent.com/deekayen/4148741/raw/98d35708fa344717d8eee15d11987de6c8e26d7d/1-1000.txt");
}
```
More information about the Digitalmars-d-learn
mailing list