Aborts the request, if it is still running, and calls the error callback. Note: This is only supported for network requests
Sets the error callback for the request callback: The error callback
Sets the retry callback for the request callback: The retry callback
Sets the success callback for the request callback: The success callback
Actually sends the request, parses it, and calls either the success or error functions if they exist. Returns the parsed response.
Adds an authentication provider to the request (used to authenticate the request) authenticationProvider: The authentication provider
Sets the cache to use for the request cacheName: The cache name cache: The cache to use (default: IndexedDB)
Sets the cache key for the request cacheKey: The cache key
Adds a cancellation token to the request (used to cancel the request) cancellationToken: The cancellation token Note: The request will finish executing, but the success/error callbacks will not be called if the request is cancelled.
Adds credentials to the request credentials: The credentials
Adds header values to the request headers: The header values
Sets the parser for the request parser: The parser
Sets the number of retry attempts for the request retryAttempts: The number of retry attempts (default: 3) Note: The retry attempts are only used for network requests
Sets the retry delay for the request in milliseconds retryDelay: The retry delay in milliseconds (default: 1000) Note: The retry delay is only used for network requests
Sets the serializer for the request serializer: The serializer
Sets the storage mode for the request storageMode: The storage mode
Sets the timeout for the request timeout: The timeout in milliseconds (default: 60000) Note: The timeout is only used for network requests
Optional
timeout: numberStatic
deleteCreates a DELETE request Note: DELETE requests are not cached by default url: The request url data: The request data
Optional
data: anyStatic
getCreates a GET request Note: GET requests are cached by default url: The request url data: The request data
Optional
data: anyStatic
ofCreates a request of the specified type (e.g. GET, POST, PUT, DELETE, etc.) method: The request method url: The request url data: The request data
Optional
data: anyStatic
postCreates a POST request Note: POST requests are not cached by default url: The request url data: The request data
Optional
data: anyStatic
putCreates a PUT request Note: PUT requests are not cached by default url: The request url data: The request data
Optional
data: any
Request class Used to make AJAX requests and also cache the response in IndexedDB. It can also return the cached response if the request fails or times out (see StorageMode).