getContent

Call GET, and return response content. This is the simplest case, when all you need is the response body.

getContent
(
A...
)
()

Return Value

Type: auto

Buffer!ubyte which you can use as ForwardRange or DirectAccessRange, or extract data with .data() method.

Examples

globalLogLevel(LogLevel.info);
auto r = getContent("https://httpbin.org/stream/20");
assert(r.splitter('\n').filter!("a.length>0").count == 20);

Meta