angular/packages/common/http/src/errors.ts
Matthieu Riegler 7dde42a5df feat(http): allow customization of the HttpTransferCache. (#52029)
`provideClientHydration()` accepts new `HydrationFeature` : `HttpTransferCacheOptions`.

`withHttpTransferCacheOptions` accepts an option object:
* `includeHeaders` : list of headers entries to keep in the cache with the request
* `filter` a callback to determine if a request should be cached
* `includePostRequests`: to include POST requests in the allowed methods

Implements some of the features requested in #50117

PR Close #52029
2023-10-06 12:12:47 -07:00

17 lines
486 B
TypeScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* The list of error codes used in runtime code of the `common/http` package.
* Reserved error code range: 2800-2899.
*/
export const enum RuntimeErrorCode {
MISSING_JSONP_MODULE = -2800,
NOT_USING_FETCH_BACKEND_IN_SSR = 2801,
HEADERS_ALTERED_BY_TRANSFER_CACHE = 2802,
}