AcediaDocumentation

HttpResponse

Result records returned by request.

Fields

MemberType / signatureMeaning
SuccessbooleanTransport succeeded and status is 200–299.
StatusCodenumberHTTP status, or 0 on transport failure.
StatusMessagestringReason/status text.
BodystringResponse bytes, or transport error text on failure.
HeaderstableResponse header names mapped to values.
local response = request({ Url = "https://example.com" })
print(response.StatusCode, response.Success)
if response.Success then print(response.Body) end

Non-2xx HTTP responses are still returned as records. Always check Success or StatusCode before decoding Body as application data.

On this page