Skip to main content

http

Library

Library used to interact with the HTTP protocol.

Functions

request

This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. Yields
http.request(
optionsrSUNCHttpRequest--

The parameters for the http request.

) → rSUNCHttpResponse--

A response to the rSUNCHttpRequest.

Performs an HTTP request with the given options, providing the given response

Headers

By default, this function attaches the following headers:

{ExecutorName}-User-Identifier	-- A string unique to each user, and does not change if the script executor is used across computers, useful to check if a user is the same, regardless of computer.

{ExecutorName}-Fingerprint      -- The hardware identifier of the user, useful to check if the user is using the same computer.

User-Agent                      -- The name and version of the executor.
Show raw api
{
    "functions": [
        {
            "name": "request",
            "desc": "Performs an HTTP request with the given options, providing the given response\n\n\n:::tip Headers\nBy default, this function attaches the following headers:\n\n    {ExecutorName}-User-Identifier\t-- A string unique to each user, and does not change if the script executor is used across computers, useful to check if a user is the same, regardless of computer.\n\n    {ExecutorName}-Fingerprint      -- The hardware identifier of the user, useful to check if the user is using the same computer.\n\n    User-Agent                      -- The name and version of the executor.\n\n:::",
            "params": [
                {
                    "name": "options",
                    "desc": "The parameters for the http request.",
                    "lua_type": "rSUNCHttpRequest"
                }
            ],
            "returns": [
                {
                    "desc": "A response to the rSUNCHttpRequest.",
                    "lua_type": "rSUNCHttpResponse"
                }
            ],
            "function_type": "static",
            "yields": true,
            "source": {
                "line": 37,
                "path": "impl/Libraries/http.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "http",
    "desc": "Library used to interact with the HTTP protocol.",
    "tags": [
        "Library"
    ],
    "source": {
        "line": 7,
        "path": "impl/Libraries/http.luau"
    }
}