Skip to main content

别名

  • http_request
  • http.request

参数

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

返回值

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

类型

RequestOptions

定义 request 读取的 options table。

Response

定义没有 request error 时 request 返回的 response table。

示例

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