Skip to content

Commit 5edf455

Browse files
authored
Merge pull request yhirose#231 from sux2mfgj/fix_the_sample
Fix a sample code of multipart/form-data POST data in the README.md.
2 parents a99e02a + 760bccc commit 5edf455

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,13 @@ svr.set_error_handler([](const auto& req, auto& res) {
7777
```cpp
7878
svr.Post("/multipart", [&](const auto& req, auto& res) {
7979
auto size = req.files.size();
80-
auto ret = req.has_file("name1"));
80+
auto ret = req.has_file("name1");
8181
const auto& file = req.get_file_value("name1");
8282
// file.filename;
8383
// file.content_type;
84-
auto body = req.body.substr(file.offset, file.length));
85-
})
84+
auto body = req.body.substr(file.offset, file.length);
85+
});
86+
8687
```
8788

8889
### Stream content with Content provider

0 commit comments

Comments
 (0)