在http.request上遇到了分段错误

我想使用Lua Socket库向API发送一个get请求,但每次我这样做时它都会返回分段错误,我无法找出原因!

local http = require("socket.http")

local data = {
    id = "1234"
}

local response = http.request {
    method = "GET",
    headers = {["Content-Type"]="application/json"},
    url = 'http://example.com/api/',
    data = data
}

local tokenResponse = json.parse(response.content)

无论我如何尝试,总是返回分段错误。有什么线索吗?

我在Debian 8.6 Jessie上运行。

点赞