123456module juptune.http.client;
alias StreamResponseFunc = Result function(
HttpResponse statusAndHeaders,
const const ubyte[] bodyChunk
);
A function provided by HttpClientwhich can be used to stream read data from the response body.
Please note that the HttpResponsedoes not contain a body - it only contains the headers and status line.
Please note that this is marked @safeto help make it clear that the scopefor bodyChunkis very important to adhear to.
You can (and probably will have to) mark your func/lambda as @trusted, but that will also disable the compiler making sure that you don't accidentally escape the bodyChunkparameter.