Skip to main content
Sends an HTTP or HTTPS request and yields until it completes. options must include Url. Method defaults to GET and must be GET, POST, PUT, PATCH, or DELETE. Headers, Cookies, and Body are optional. Request errors return an error string; completed requests return a response table.

Syntax

Aliases

  • http_request
  • http.request

Arguments

Returns

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.