MCPcopy Create free account
hub / github.com/angular/angular / makeTokenTagInterceptorFn

Function makeTokenTagInterceptorFn

packages/common/http/test/provider_spec.ts:669–671  ·  view source on GitHub ↗
(tag: InjectionToken<string>)

Source from the content-addressed store, hash-verified

667}
668
669function makeTokenTagInterceptorFn(tag: InjectionToken<string>): HttpInterceptorFn {
670 return (req, next) => next(addTagToRequest(req, inject(tag)));
671}
672
673function addTagToRequest(req: HttpRequest<unknown>, tag: string): HttpRequest<unknown> {
674 const prevTagHeader = req.headers.get('X-Tag') ?? '';

Callers 1

provider_spec.tsFile · 0.85

Calls 3

injectFunction · 0.90
addTagToRequestFunction · 0.85
nextFunction · 0.50

Tested by

no test coverage detected