-
-
Notifications
You must be signed in to change notification settings - Fork 2
Library: Rest
ᴏᴠ ━ ᴀɴɪꜱᴀ edited this page Dec 5, 2024
·
7 revisions
Seeking a more streamlined, efficient, and user-friendly alternative to fetchRemote
and callRemote
to enhance your productivity? Consider transitioning to Assetify's REST module, where we handle it natively on your behalf! 😃
Add the below code globally once in either of the shared .lua
script of the resource you want to use within:
loadstring(exports.assetify_library:import("rest"))()
-
✨ Executes a GET request on specified URL.
local promise: cPromise = assetify.rest:get( string: route, --Remote URL int: timeout, --Optional table: headers, --Optional table: credentials --Optional: Essentially required for protected requests )
-
✨ Executes a POST request on specified URL.
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 )