Lua-cURLv3/examples/cURLv3/post_json.lua

12 lines
229 B
Lua

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()