HttpHeaders
Represents the header configuration options for an HTTP request. Instances are immutable. Modifying methods return a cloned instance with the change. The original object is never changed.
constructor
HttpHeaders
Constructs a new HTTP header object with the given values.
string | { [name: string]: string | number | (string | number)[]; } | Headers | undefined
HttpHeaders
has
boolean
Checks for existence of a given header.
string
The header name to check for existence.
boolean
get
string | null
Retrieves the first value of a given header.
string
The header name.
string | null
keys
string[]
Retrieves the names of the headers.
string[]
getAll
string[] | null
Retrieves a list of values for a given header.
string
The header name from which to retrieve values.
string[] | null
append
HttpHeaders
Appends a new value to the existing set of values for a header and returns them in a clone of the original instance.
string
The header name for which to append the values.
string | string[]
The value to append.
HttpHeaders
set
HttpHeaders
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.
string
The header name.
string | string[]
The value or values to set or override for the given header.
HttpHeaders
delete
HttpHeaders
Deletes values for a given header in a clone of the original instance.
string
The header name.
string | string[] | undefined
The value or values to delete for the given header.
HttpHeaders