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?

Reply via email to