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

Function addTagToRequest

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

Source from the content-addressed store, hash-verified

836}
837
838function addTagToRequest(req: HttpRequest<unknown>, tag: string): HttpRequest<unknown> {
839 const prevTagHeader = req.headers.get('X-Tag') ?? '';
840 const tagHeader = prevTagHeader.length > 0 ? prevTagHeader + ',' + tag : tag;
841
842 return req.clone({
843 setHeaders: {
844 'X-Tag': tagHeader,
845 },
846 });
847}
848
849const FAKE_JSONP_BACKEND_PROVIDER = {
850 provide: JsonpClientBackend,

Callers 4

interceptMethod · 0.85

Calls 2

getMethod · 0.65
cloneMethod · 0.65

Tested by

no test coverage detected