function DataModel:HttpGet(url: string): string
Sends a GET request and returns the response body.
Aliasesgame:HttpGetAsync
Example
local body = game:HttpGet("https://api.github.com")
print(body)
function DataModel:HttpPost(url: string, data: string, synchronousOrContentType: boolean | string?, contentTypeOrSynchronous: string | boolean?): string
Sends a POST request and returns the response body. Content type defaults to text/plain, and the last two arguments may be given in either order.
Example
local body = game:HttpPost(
"https://httpbin.org/post",
'{"hello":"world"}',
"application/json"
)
print(body)
function DataModel:GetObjects(asset: number | string): { Instance }
Loads an asset and returns it in an array.
Example
local objects = game:GetObjects("rbxassetid://1234567890")
objects[1].Parent = workspace