Fix set_content_provider example in README.md (#1163)

This commit is contained in:
ArnaudBienner 2022-01-13 18:26:34 +01:00 committed by GitHub
parent 412ab5f063
commit 33f53aa458
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -303,7 +303,7 @@ Without content length:
svr.Get("/stream", [&](const Request &req, Response &res) {
res.set_content_provider(
"text/plain", // Content type
[&](size_t offset, size_t length, DataSink &sink) {
[&](size_t offset, DataSink &sink) {
if (/* there is still data */) {
std::vector<char> data;
// prepare data...