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

Method addHeaderEntry

packages/common/http/src/headers.ts:248–256  ·  view source on GitHub ↗
(name: string, value: string)

Source from the content-addressed store, hash-verified

246 }
247
248 private addHeaderEntry(name: string, value: string) {
249 const key = name.toLowerCase();
250 this.maybeSetNormalizedName(name, key);
251 if (this.headers.has(key)) {
252 this.headers.get(key)!.push(value);
253 } else {
254 this.headers.set(key, [value]);
255 }
256 }
257
258 private setHeaderEntries(name: string, values: any) {
259 const headerValues = (Array.isArray(values) ? values : [values]).map((value) =>

Callers 1

constructorMethod · 0.95

Calls 5

hasMethod · 0.65
getMethod · 0.65
setMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected