http.request
functionwaits#Sends a request and yields until the response is back. A request that fails, or goes over 300 requests a minute, gives ok = false, status 0 and the error.
local response = http.request({ url = "https://example.com" })Use it forfetching data from a web service, or posting scores to your own website.
optionsThe url, and the method, headers and body if needed.Build a request callurl · method · headers · body · timeout
urlrequiredThe http or https address to call, such as
https://example.com/scores, up to 2048 characters.methodThe kind of request to make, which is GET when you leave it out.
headersA table of header names and their values, with at most 32 headers.
bodyThe text to send, up to 1 MB, which GET and HEAD requests never send.
timeoutHow many seconds to wait, which is 10 by default and at most 30.