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

Function makeOrderedTagInterceptorFn

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

Source from the content-addressed store, hash-verified

819}
820
821function makeOrderedTagInterceptorFn(tag: string, order: string[]): HttpInterceptorFn {
822 return (req, next) => {
823 order.push(`${tag}:request`);
824 return next(addTagToRequest(req, tag)).pipe(
825 tap((event) => {
826 if (event instanceof HttpResponse) {
827 order.push(`${tag}:response`);
828 }
829 }),
830 );
831 };
832}
833
834function makeTokenTagInterceptorFn(tag: InjectionToken<string>): HttpInterceptorFn {
835 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