-
-
Notifications
You must be signed in to change notification settings - Fork 2
Library: Rest
ᴏᴠ ━ ᴀɴɪꜱᴀ edited this page Dec 5, 2024
·
7 revisions
Longing for more straightforward, simplistic and optimized version of fetchRemote
& callRemote
to increase your productivity? Switch to Assetify's REST module and let us manage it natively for you! 😃
Add the below code once in either of the shared .lua
script of the resource you want to use within:
--Declare it globally only once
loadstring(exports.assetify_library:import("rest"))()
local promise: cPromise = assetify.rest:get(
string: route, --Remote URL
int: timeout, --(Optional)
table: headers, --(Optional)
table: credentials --(Optional) Essentially required for protected requests.
)
local promise: cPromise = assetify.rest:post(
string: route, --Remote URL
table: data,
int: timeout, --(Optional)
table: headers, --(Optional)
table: credentials --(Optional) Essentially required for protected requests.
)