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

Method set

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

* Sets or modifies a value for a given header in a clone of the original instance. * If the header already exists, its value is replaced with the given value * in the returned object. * * @param name The header name. * @param value The value or values to set or override for the given

(name: string, value: string | string[])

Source from the content-addressed store, hash-verified

155 * @returns A clone of the HTTP headers object with the newly set header value.
156 */
157 set(name: string, value: string | string[]): HttpHeaders {
158 return this.clone({name, value, op: 's'});
159 }
160 /**
161 * Deletes values for a given header in a clone of the original instance.
162 *

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.95

Tested by

no test coverage detected