DroneUTILS

High-performance stateless utility functions for the Lau Engine.

General Usage

To use these functions in LAU, you must encode your data as a JSON string and decode the response.

-- Standard Pattern
varol data = { ["key"] = value }
varol raw = http.post("https://drone.pnblox.xyz/funcs/name", http.jsonEncode(data))
varol res = http.jsonDecode(raw)

Available Functions

POST /funcs/stringsplit

Splits a string into a list using a specified separator.

Arguments: string1 (Text), string2 (Separator)

varol data = {
    ["string1"] = "A,B,C,D",
    ["string2"] = ","
}

varol raw = http.post("https://drone.pnblox.xyz/funcs/stringsplit", http.jsonEncode(data))
varol res = http.jsonDecode(raw)

if res["success"] then
    print(res["result"][1]) -- Output: "A"
end
GET/POST /funcs/ping

Check if the server is online and returns current timestamp.

varol raw = http.get("https://drone.pnblox.xyz/funcs/ping")
print(raw) -- Returns "Pong!" metadata