7.6.2.28. consoleFetchJSON
A custom wrapper around fetch that adds console specific headers and allows for retries and timeouts. It also validates the response status code and throws appropriate error or logs out the user if required. It returns the response as a JSON object. Uses consoleFetch internally. It returns a promise that resolves to the response as JSON object.
| Parameter Name | Description |
|---|---|
|
| The URL to fetch |
|
| The HTTP method to use. Defaults to GET |
|
| The options to pass to fetch |
|
| The timeout in milliseconds |
|
| The name of the cluster to make the request to. Defaults to the active cluster the user has selected |