Skip to main content

$http

The $http service is the built-in Tovie Platform HTTP client. It allows bot scripts to execute HTTP requests and exchange data with external systems.

info

You can also execute HTTP requests from the script using the HttpRequest tag, while the J‑Graph visual editor provides the HTTP request block.

The built-in $http service is not available in the ECMAScript 6 runtime. Instead, you should use a library like Axios, Ky, or another similar solution.

Methods

Sending HTTP requests

MethodWhat it does
queryExecutes an HTTP request.
getExecutes an HTTP GET request.
postExecutes an HTTP POST request.
putExecutes an HTTP PUT request.
deleteExecutes an HTTP DELETE request.
configConfigures the default HTTP client settings.

Checking URL availability

MethodWhat it does
checkChecks whether an HTTP request to one of several external URLs returns 200 OK.
checkUrlsChecks whether HTTP requests to several external URLs return 200 OK.