Sends an HTTP request described by an options table and returns a response table. options.Url is required; Method defaults to GET; Headers, Cookies, and Body are optional. A body is not allowed with GET or HEAD. The response table carries Success, StatusCode, StatusMessage, RawHeaders, Headers, Cookies, and Body. Headers keys keep the casing the server sent. Cookies holds the name and value of every Set-Cookie the response set, except .ROBLOSECURITY. Also registered as http_request.

Parameters

table
required
The request options, with at least a Url.

Returns

Response
A table with Success, StatusCode, StatusMessage, RawHeaders, Headers, Cookies, and Body.

Example

Errors

  • httpget: the simple string fetch.