Skip to content
HTTPOverviewUpdated · 0.744

HttpGet

Provides the module's HTTP GET entry point.

AliasesgethttphttpgethttpGethttpgetasyncHttpGetAsyncsyn_httpget

Details#

Performs an HTTP GET and returns response content as a string. Use request when response status and headers are needed. Network failures may raise an error; the example targets a local test server.

Examples#

Example

Luau
local ok, body = pcall(HttpGet, "http://127.0.0.1:8080/")
if ok then print(body) else warn(body) end