HTTPOverview
request
Provides the module's general HTTP request entry point.
Aliases
http_requesthttp.http_requesthttp.requesthttp.Requesthttprequestkrnl_requestsyn_requestwebrequestDetails#
Sends an HTTP request described by a table with Url, optional Method, Headers and Body. Inspect StatusCode and Body in the response; transport failures differ from an HTTP error status. The example requires a local HTTP server on port 8080.
Examples#
Example
local ok, response = pcall(request, {
Url = "http://127.0.0.1:8080/",
Method = "GET",
})
if ok then print(response.StatusCode, response.Body) else warn(response) end