HTTP & JSON Utilities
HTTP Requests
⚠️
Coroutine Required
All HTTP requests must be performed inside a coroutine to avoid blocking the server.
http.get(url, headers)Performs an HTTP GET request to the specified url.
headers is an optional table of HTTP headers. Returns the response body and status.
http.post(url, headers, postData)Performs an HTTP POST request to the specified url.
headers is an optional table of HTTP headers.
postData is the string or table of data to send in the body of the request. Returns the response body and status.
ℹ️
HTTP Usage
Perfect for integrating with external APIs, webhooks, or fetching data from remote services!
JSON Utilities
json.encode(dataTable)Encodes a Lua table into a JSON string.
json.decode(jsonString)Decodes a JSON string into a Lua table. Returns nil if the JSON is invalid.
ℹ️
JSON Parsing
Use JSON utilities to communicate with web APIs and store structured configuration data.