File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -502,7 +502,7 @@ auto res = cli.Get(
502502``` cpp
503503std::string body = ...;
504504
505- auto res = cli_ .Post(
505+ auto res = cli .Post(
506506 " /stream" , body.size(),
507507 [](size_t offset, size_t length, DataSink &sink) {
508508 sink.write(body.data() + offset, length);
@@ -511,6 +511,21 @@ auto res = cli_.Post(
511511 "text/plain");
512512```
513513
514+ ### Chunked transfer encoding
515+
516+ ```cpp
517+ auto res = cli.Post(
518+ "/stream",
519+ [](size_t offset, DataSink &sink) {
520+ sink.os << "chunked data 1";
521+ sink.os << "chunked data 2";
522+ sink.os << "chunked data 3";
523+ sink.done();
524+ return true; // return 'false' if you want to cancel the request.
525+ },
526+ "text/plain");
527+ ```
528+
514529### With Progress Callback
515530
516531``` cpp
You can’t perform that action at this time.
0 commit comments