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

Method get

packages/common/http/src/headers.ts:103–108  ·  view source on GitHub ↗

* Retrieves the first value of a given header. * * @param name The header name. * * @returns The value string if the header exists, null otherwise

(name: string)

Source from the content-addressed store, hash-verified

101 * @returns The value string if the header exists, null otherwise
102 */
103 get(name: string): string | null {
104 this.init();
105
106 const values = this.headers.get(name.toLowerCase());
107 return values && values.length > 0 ? values[0] : null;
108 }
109
110 /**
111 * Retrieves the names of the headers.

Callers

nothing calls this directly

Calls 2

initMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected