Langsung ke konten utama

Alias

  • http_request
  • http.request

Argumen

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

Return

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

Tipe

RequestOptions

Mendefinisikan tabel options yang dibaca oleh request.

Response

Mendefinisikan tabel response yang dikembalikan request saat tidak ada request error.

Contoh

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