Available since Version 1.1.
Performs an HTTP GET request.
Syntax
HTTP.Get( url, callback, options )Arguments
url(string): The URL to send the GET request to.callback(function): A function to call when the request completes. Receives a response object. See HTTP for the response object structure.options(table, optional): Optional configuration for the request.timeout(number): The maximum time in milliseconds to wait for a response. Defaults to30000.
Return Values
No return values.
Examples
HTTP.Get("https://example.com/api/data", function(response)
if response.ok then
print(response.body)
else
print("Request failed: " .. (response.error or tostring(response.statusCode)))
end
end)