Skip to main content

Aliases

  • http_request
  • http.request

Arguments

RequestOptions
required
Request options table. Url is required; Method, Headers, Cookies, and Body are optional.

Returns

Response | string
On request error, an error string. Otherwise a response table.

Types

RequestOptions

Defines the options table read by request.

Response

Defines the response table returned by request when the request completes without returning an error string.

Example

Send a GET request and handle either the response table or the request error string.