MCPcopy Index your code
hub / github.com/angular/angular / addTagToRequest

Function addTagToRequest

packages/common/http/test/provider_spec.ts:657–666  ·  view source on GitHub ↗
(req: HttpRequest<unknown>, tag: string)

Source from the content-addressed store, hash-verified

655}
656
657function addTagToRequest(req: HttpRequest<unknown>, tag: string): HttpRequest<unknown> {
658 const prevTagHeader = req.headers.get('X-Tag') ?? '';
659 const tagHeader = prevTagHeader.length > 0 ? prevTagHeader + ',' + tag : tag;
660
661 return req.clone({
662 setHeaders: {
663 'X-Tag': tagHeader,
664 },
665 });
666}
667
668const FAKE_JSONP_BACKEND_PROVIDER = {
669 provide: JsonpClientBackend,

Callers 3

interceptMethod · 0.85

Calls 2

getMethod · 0.65
cloneMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…