I'm trying to communicate with my servers from Lua to authenticate a user. This is what my request function looks like:
function http.send(url)
local req = require("socket.http")
local b, c, h = req.request{
url = url,
redirect = true
}
return b
end
However, I noticed that the data is discarded because I did not provide the sink
parameter. I want to be able to return the downloaded data as a whole string, not download to a file/table. How would I go about this?