【发布时间】:2019-01-23 17:39:32
【问题描述】:
我使用这样的lua代码来发送json post数据:
local cURL = require("cURL")
local request = cURL.easy{
url = "http://myurl",
post = true,
httpheader = { "Content-Type: application/json"; },
postfields = jsonString,
timeout = 1
}
request:perform()
如何获取响应json字符串?
【问题讨论】:
-
没用过
lua-curl,但是阅读manual 3 分钟建议添加writefunction就可以了。