getCancelTokenSource()
Obtains a cancel token source object. The cancel token source object can cancel a request by passing a token as a signal to it.
Returns
The cancel token source as an object.
Parameters
This API does not have parameters.
Usage example
In this example, the API obtains a cancel token source object and uses it to cancel a request.
const { getCancelTokenSource } = PCore.getRestClient();
const cancelTokenSource = getCancelTokenSource();
cancelTokenSource.cancel();
Previous topic APIs in the RestClient module Next topic getHeaderProcessor()