fetchSync() Function
The fetchSync()
function allows you to make http(s) requests to backend servers to record or query information. The syntax is similar to the standard fetch API, however with the difference that fetchSync
does not return a promise and instead executes the request synchronously.
#
ExampleThis policy will print the current IP address of the node where jsPolicy runs on and tries to query an address that does not exist.