mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-24 13:39:11 +00:00
Implemented #946 in a different way
This commit is contained in:
parent
0104614656
commit
5a43bb8149
3 changed files with 55 additions and 7 deletions
|
@ -266,7 +266,7 @@ svr.Get("/stream", [&](const Request &req, Response &res) {
|
|||
sink.write(&d[offset], std::min(length, DATA_CHUNK_SIZE));
|
||||
return true; // return 'false' if you want to cancel the process.
|
||||
},
|
||||
[data] { delete data; });
|
||||
[data](bool success) { delete data; });
|
||||
});
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue