std.net.curl and POST-requests with files

Vindex tech.vindex at gmail.com
Wed May 10 14:06:20 UTC 2023


The [std.net.curl](https://dlang.org/phobos/std_net_curl.html) 
module provides these functions:

```d
T[] post(T = char, PostUnit)(const(char)[] url, const(PostUnit)[] 
postData, HTTP conn = HTTP())
T[] post(T = char)(const(char)[] url, string[string] postDict, 
HTTP conn = HTTP())
```

How can I use it if I want to transfer a file with some name? (No 
problem with regular text.)


More information about the Digitalmars-d-learn mailing list