Add. Post JSON example.
This commit is contained in:
parent
187f44306f
commit
171aa24120
12
examples/cURLv3/post_json.lua
Normal file
12
examples/cURLv3/post_json.lua
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
local cURL = require "cURL"
|
||||||
|
|
||||||
|
c = cURL.easy{
|
||||||
|
url = "http://posttestserver.com/post.php",
|
||||||
|
post = true,
|
||||||
|
httpheader = {
|
||||||
|
"Content-Type: application/json";
|
||||||
|
};
|
||||||
|
postfields = '{"hello": "world"}';
|
||||||
|
}
|
||||||
|
|
||||||
|
c:perform()
|
Loading…
x
Reference in New Issue
Block a user