request
Full request API. Options: Url, Method, Headers, Cookies, Body. Returns Success, StatusCode, StatusMessage, Headers, Cookies, Body.
Syntax
request(options: table) -> table
Parameters
| Parameter | Type | Description |
|---|---|---|
options | table | A table of options that controls the call. |
Returns
| Type | Description |
|---|---|
table | Success, StatusCode, StatusMessage, Headers, Cookies, Body |
Description
request is part of the HTTP library. HTTP helpers use the module's own WinHTTP client, so they are not limited by Roblox HttpService rules.
The operation is performed immediately using the arguments supplied at the call site.
The aliases http_request(options), syn.request(options) resolve to the same implementation.
Example
local response = request({
Url = "https://httpbin.org/get",
Method = "GET",
Headers = { ["User-Agent"] = "yuari" }
})
print(response.Success, response.StatusCode, response.Body)
Notes
- Aliases:
http_request(options),syn.request(options). - HTTP calls use the module's WinHTTP client and require network access.