Skip to content
HTTPOverview

HttpPost

Provides the module's HTTP POST entry point.

AliaseshttpposthttpPosthttppostasyncHttpPostAsyncposthttpsyn_httppost

Details#

Posts a body to a URL, with an optional content type. Returns response content rather than a complete response table. The example needs a local server that accepts POST requests.

Examples#

Example

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