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

Function makeTokenTagInterceptorFn

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

Source from the content-addressed store, hash-verified

832}
833
834function makeTokenTagInterceptorFn(tag: InjectionToken<string>): HttpInterceptorFn {
835 return (req, next) => next(addTagToRequest(req, inject(tag)));
836}
837
838function addTagToRequest(req: HttpRequest<unknown>, tag: string): HttpRequest<unknown> {
839 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