Curl, how to recieve data.
holo via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Oct 18 11:04:51 PDT 2015
I'm trying to receive data from curl request my sample code looks
like that:
...
auto client = HTTP(endpoint ~ "?" ~
canonicalQueryString);
client.method = HTTP.Method.get;
client.addRequestHeader("x-amz-date", xamztime);
client.addRequestHeader("Authorization",
authorizationHeader);
client.onReceive = (ubyte[] data)
{
recievedData = data;
return data.length;
};
client.perform();
return new Result(recievedData);
...
ubyte[] receivedData;
...
but im getting only last (like from "tail" command in unix
systems) part of data which im expecting.
How to receive and save whole data which came as feedback for
request? Or is there some other way to access it after usage of
client.perform method?
More information about the Digitalmars-d-learn
mailing list