Skip to content

Commit 40662d5

Browse files
committed
1 parent 7b9d752 commit 40662d5

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,19 @@ res = cli.Post("/person", "name=john1&note=coder", "application/x-www-form-urlen
115115

116116
```c++
117117
httplib::Params params;
118-
params["name"] = "john";
119-
params["note"] = "coder";
118+
params.emplace("name", "john");
119+
params.emplace("note", "coder");
120+
121+
auto res = cli.Post("/post", params);
122+
```
123+
or
124+
125+
```c++
126+
httplib::Params params{
127+
{ "name", "john" },
128+
{ "note", "coder" }
129+
};
130+
120131
auto res = cli.Post("/post", params);
121132
```
122133

0 commit comments

Comments
 (0)