HTTP APIs

warning Warning Deprecated: use net instead.

http.request

http.request(url, options?)

Deprecated: Use net.proxyFetch instead.

Performs an authenticated HTTP request through the server proxy.

Parameters:

  • url (string) — Target URL.
  • options? (table) — Method, headers, body, and response encoding.

Returns:

  • table — Status, headers, and decoded response body.

See: API/net > net.proxyFetch(url, options?)