Skip to content

Commit 171aa24

Browse files
committed
Add. Post JSON example.
1 parent 187f443 commit 171aa24

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

examples/cURLv3/post_json.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
local cURL = require "cURL"
2+
3+
c = cURL.easy{
4+
url = "http://posttestserver.com/post.php",
5+
post = true,
6+
httpheader = {
7+
"Content-Type: application/json";
8+
};
9+
postfields = '{"hello": "world"}';
10+
}
11+
12+
c:perform()

0 commit comments

Comments
 (0)