mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Fix set_content_provider example in README.md (#1163)
This commit is contained in:
parent
412ab5f063
commit
33f53aa458
1 changed files with 1 additions and 1 deletions
|
@ -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...
|
||||
|
|
Loading…
Reference in a new issue