Skip to content

Commit f539a83

Browse files
committed
Update
1 parent ebc6dbe commit f539a83

File tree

3 files changed

+172
-174
lines changed

3 files changed

+172
-174
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,7 @@ svr.Post("/form", [&](const auto& req, auto& res) {
379379
#### 'multipart/form-data' POST data
380380

381381
```cpp
382-
svr.Post("/multipart", [&](const auto& req, auto& res) {
383-
// New structured form data API provides clear separation between text fields and files
384-
382+
svr.Post("/multipart", [&](const Request& req, Response& res) {
385383
// Access text fields (from form inputs without files)
386384
std::string username = req.form.get_field("username");
387385
std::string bio = req.form.get_field("bio");
@@ -445,7 +443,7 @@ svr.Post("/content_receiver",
445443
// This approach allows streaming processing of large files
446444
FormFileItems items;
447445
content_reader(
448-
[&](const FormFile &item) {
446+
[&](const FormData &item) {
449447
items.push_back(item);
450448
return true;
451449
},
@@ -770,7 +768,7 @@ auto res = cli.Post("/post", params);
770768
### POST with Multipart Form Data
771769

772770
```c++
773-
httplib::FormDataInputItems items = {
771+
httplib::UploadFormDataItems items = {
774772
{ "text1", "text default", "", "" },
775773
{ "text2", "aωb", "", "" },
776774
{ "file1", "h\ne\n\nl\nl\no\n", "hello.txt", "text/plain" },

0 commit comments

Comments
 (0)