1
0
mirror of synced 2025-07-29 11:01:13 +03:00
This commit is contained in:
yhirose
2019-07-23 09:52:12 -04:00
parent 4f237af813
commit 34651ef89b
3 changed files with 108 additions and 78 deletions

View File

@ -150,6 +150,20 @@ httplib::Params params{
auto res = cli.Post("/post", params);
```
### POST with Multipart Form Data
```c++
httplib::MultipartFormDataItems items = {
{ "text1", "text default", "", "" },
{ "text2", "aωb", "", "" },
{ "file1", "h\ne\n\nl\nl\no\n", "hello.txt", "text/plain" },
{ "file2", "{\n \"world\", true\n}\n", "world.json", "application/json" },
{ "file3", "", "", "application/octet-stream" },
};
auto res = cli.Post("/multipart", items);
```
### PUT
```c++