@@ -379,9 +379,7 @@ svr.Post("/form", [&](const auto& req, auto& res) {
379
379
#### 'multipart/form-data' POST data
380
380
381
381
``` 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) {
385
383
// Access text fields (from form inputs without files)
386
384
std::string username = req.form.get_field("username");
387
385
std::string bio = req.form.get_field("bio");
@@ -445,7 +443,7 @@ svr.Post("/content_receiver",
445
443
// This approach allows streaming processing of large files
446
444
FormFileItems items;
447
445
content_reader (
448
- [&](const FormFile &item) {
446
+ [&](const FormData &item) {
449
447
items.push_back(item);
450
448
return true;
451
449
},
@@ -770,7 +768,7 @@ auto res = cli.Post("/post", params);
770
768
### POST with Multipart Form Data
771
769
772
770
``` c++
773
- httplib::FormDataInputItems items = {
771
+ httplib::UploadFormDataItems items = {
774
772
{ "text1", "text default", "", "" },
775
773
{ "text2", "aωb", "", "" },
776
774
{ "file1", "h\ne\n\nl\nl\no\n", "hello.txt", "text/plain" },
0 commit comments