$httpRequest
Makes a HTTP request, with a content and headers. Returns the response content.
Usage
$httpRequest[URL;Method;Content;Header 1;Header 2;...]
- URL - The URL you want use for your request.
- Method - (Optional) default value:
GET. Can bePUT,GET,POST,DELETE,HEADorPATCH. The type of request you want to make. - Content - (Optional) default value: (empty). The body of your request. Useful with POST and similar. Format is
Content: value. - Header N - (Optional) default value: (empty). The headers used with your request. This can be used for authorization, content-type to await and other data that your URL requires to request with.
Example
Successful http request
How to successfuly get data from an api
Unsuccessful http request
Unsuccessful request without error message
Warning
The response data must be less than 1 MB in size. Requests exceeding this limit will result in an error.
In order to use $httpRequest, the URL you wish to use needs to be whitelisted. To request a whitelist, please open a ticket in our Support Server.
Error Handling
This function does not automatically throw an error if the request fails. You must check the value of $httpRequestStatus after the request to ensure the status code is what you expect.
