Using std.net.curl

David Anderson david at anderix.com
Sat Feb 29 19:32:06 UTC 2020


On Saturday, 29 February 2020 at 07:35:10 UTC, Boris Carvajal 
wrote:
> On Saturday, 29 February 2020 at 03:53:37 UTC, David Anderson 
> wrote:
>
>> I want to capture that text in a variable, but the upload 
>> function returns void. How can I get the text returned by the 
>> web server to be stored in a variable?
>
> import std;
>
> auto updata = read("inputfile");
> auto dldata = put("https://postman-echo.com/put", updata);
> writeln(dldata);

Awesome, thank you! That's exactly what I needed.


More information about the Digitalmars-d-learn mailing list