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

Function makeOrderedTagInterceptorFn

packages/common/http/test/provider_spec.ts:898–909  ·  view source on GitHub ↗
(tag: string, order: string[])

Source from the content-addressed store, hash-verified

896}
897
898function makeOrderedTagInterceptorFn(tag: string, order: string[]): HttpInterceptorFn {
899 return (req, next) => {
900 order.push(`${tag}:request`);
901 return next(addTagToRequest(req, tag)).pipe(
902 tap((event) => {
903 if (event instanceof HttpResponse) {
904 order.push(`${tag}:response`);
905 }
906 }),
907 );
908 };
909}
910
911function makeTokenTagInterceptorFn(tag: InjectionToken<string>): HttpInterceptorFn {
912 return (req, next) => next(addTagToRequest(req, inject(tag)));

Callers 1

provider_spec.tsFile · 0.85

Calls 3

addTagToRequestFunction · 0.85
nextFunction · 0.50
pushMethod · 0.45

Tested by

no test coverage detected