Yuari
Documentation
Docs/HTTP/HttpService

HttpService

Service-style wrapper: HttpService:GetAsync(url, headers?), HttpService:RequestAsync(options), HttpService:JSONEncode(value), HttpService:JSONDecode(string).

Syntax

HttpService

Parameters

This function takes no parameters.

Returns

TypeDescription
nilThis function does not return a value.

Description

HttpService is part of the HTTP library. HTTP functions use the external WinHTTP client and return the raw response body or response table.

The operation is performed immediately using the arguments supplied at the call site.

Example

local json = HttpService:JSONEncode({ health = 100, name = "bot" })
local data = HttpService:JSONDecode('{"health": 100}')
print(data.health)

Notes

  • HTTP requests are made through the external WinHTTP client.