I would like to fetch the body of an HTTPS response into a Lua variable using lcURL. Here is what I have so far, but it does not work:
local cURL = require("lcurl");
function x(str)
print(x)
end
curl = cURL.easy{url='https://devrant.com', writefunction=x}:perform():close()
I have found lots of examples of how to write them into a file, but not into a variable.
My output is:
function: 0x5594bfd310f0
function: 0x5594bfd310f0