Hi cosminonea,
To avoid the extra buffer copying, you can use the "set_response_stream" when you create the http request. When the response body data is ready, it will save to the stream buffer you provided.
To avoid the extra buffer copying, you can use the "set_response_stream" when you create the http request. When the response body data is ready, it will save to the stream buffer you provided.
concurrency::streams::container_buffer<std::vector<uint8_t>> buf;
msg.set_response_stream(buf.create_ostream());
client.request(msg).then([](http_response response)
{
return response.content_ready();
}).wait();
auto result = buf.collection();