$httpRequest

Performs an HTTP request with the specified content and headers, then returns the response body.

Usage

$httpRequest[URL;Method;Content;Header 1;Header 2;...]

Parameters

Method

Supported HTTP methods:

  • GET
  • POST
  • PUT
  • PATCH
  • DELETE
  • HEAD

If no method is provided, GET is used by default.

Content

The request body to send.

The format of the content should match the Content-Type header. For example, if you specify:

Content-Type: application/json

the content should be valid JSON.

Headers

Headers should be provided in the following format:

Header-Name: Value

For example:

Content-Type: application/json

You can provide as many headers as needed.

Timeout

Requests automatically timeout after 1 minute.

For Tier 4 and above, the timeout is extended to 30 minutes.

Example

Sending a JSON request

Member07/17/2026
!!exec $let[response;$httpRequest[My API URL;post;{"name":"Mido"};Content-Type: application/json]]
Response is $response
Response Status is $httpRequestStatus

Custom Command Bot 07/17/2026
Response is {"success":true}
Response Status is 200

Notes

  • This function does not throw an error when the server returns a non-success status code (such as 404 or 500). Always check $httpRequestStatus to verify that the request completed successfully.
  • The response body must be smaller than 1 MB. Requests that exceed this limit will be rejected.
  • The destination URL must be whitelisted before it can be used. If the URL has not yet been approved, please open a ticket in our Support Server to request whitelisting.

Function Difficulty: Medium

Tags: http request api request