mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-28 15:39:11 +00:00
Fix #68
This commit is contained in:
parent
7b9d752583
commit
40662d5e3c
1 changed files with 13 additions and 2 deletions
15
README.md
15
README.md
|
@ -115,8 +115,19 @@ res = cli.Post("/person", "name=john1¬e=coder", "application/x-www-form-urlen
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
httplib::Params params;
|
httplib::Params params;
|
||||||
params["name"] = "john";
|
params.emplace("name", "john");
|
||||||
params["note"] = "coder";
|
params.emplace("note", "coder");
|
||||||
|
|
||||||
|
auto res = cli.Post("/post", params);
|
||||||
|
```
|
||||||
|
or
|
||||||
|
|
||||||
|
```c++
|
||||||
|
httplib::Params params{
|
||||||
|
{ "name", "john" },
|
||||||
|
{ "note", "coder" }
|
||||||
|
};
|
||||||
|
|
||||||
auto res = cli.Post("/post", params);
|
auto res = cli.Post("/post", params);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue