Hi,
Thanks., after lot of hours of trail and error I have found that to retrieve the data. The thing is that the output dump disappear when I have the writefunction. Here is the code.
local curl = require('libcurl')
local ffi = require('ffi')
local returndata=""
easy = curl.easy{url=urlstr, verbose=false, noprogress=true, followlocation= false,
writefunction = function(data, size, n)
local size = tonumber(size * n)
ret = ffi.string(data, size)
returndata = returndata .. ret
return size
end,
}
easy:perform()
easy:close()
print(returndata)