cURL, кажется, не вызывает функцию записи, когда возвращается пустой ответ
При пустом ответе responseHandler не вызывается.
Как тогда поймать пустой ответ?
local cURL = require("cURL")
function responseHandler(data)
print(data)
end
local headers = {
"Accept: text/*",
"Accept-Language: en",
"Accept-Charset: iso-8859-1,*,utf-8",
"Cache-Control: no-cache"
}
local url = 'http://mydomain/path'
c = cURL.easy{
url = url
ssl_verifypeer = false,
ssl_verifyhost = false,
httpheader = headers,
writefunction = function(data)
responseHandler(data)
end
}
c:perform()