On API reference (http) you can see the following example
local function http_result(self, _, response)
print(response.status)
print(response.response)
pprint(response.headers)
end
function init(self)
http.request("http://www.google.com", "GET", http_result)
end
How can I add a parameter to the callback function? When I try it I get an error. Something like this:
function init(self)
http.request("http://www.google.com", "GET", http_result(MY_PARAMETER)
end