On Sunday, 18 October 2015 at 18:04:53 UTC, holo wrote:
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?

I believe `onReceive` called multiple times with chunks of received data. So, you need to use `Appender` or `~`.

A bit off-topic:
Are you trying to download file from S3? It seems I should really start working on my S3 library...

Reply via email to