Vital.sandbox
Rest

rest.get

Shared

Executes a GET request on specified url


Syntax

local response, error = rest.get(url, headers = {})

Requires execution within a valid thread context for asynchronous, non-blocking operation.
Calls made outside a thread will fail to process.

Parameters

TypeNameDescription
stringurlRequest URL to query
tableheadersRequest headers for query

Returns

TypeNameDescription
string / boolresponseResponse on successful execution, or false on failure
string / boolerrorfalse on successful execution, or error on failure

Examples

engine.print("Response:", rest.get("https://github.com/ov-studio/Vital.kit/blob/main/manifest.json"))

On this page