request
Sends an HTTP request and yields until it completes. Options take Url, Method, Body, Headers and Cookies; the response carries Success, Body, StatusCode, StatusMessage and Headers.
Signature
request(options: RequestOptions): ResponseParameters
optionsRequestOptionsUrl, Method, Body, Headers, Cookies.
Returns
Response
Note
Example
local res = request({
Url = "https://httpbin.org/post",
Method = "POST",
Headers = { ["Content-Type"] = "application/json" },
Body = game:GetService("HttpService"):JSONEncode({ hello = "world" })
})
print(res.StatusCode, res.Body)