HttpHeaders
class
Immutable set of Http headers, with lazy parsing.
class HttpHeaders { constructor(headers?: string | {...}) has(name: string): boolean get(name: string): string | null keys(): string[] getAll(name: string): string[] | null append(name: string, value: string | string[]): HttpHeaders set(name: string, value: string | string[]): HttpHeaders delete(name: string, value?: string | string[]): HttpHeaders }
Constructor
|
headers | Type: Optional. Default is |
Methods
has()
|
||
---|---|---|
Checks for existence of header by given name. |
||
|
name | Type: |
Returns
boolean
get()
|
||
---|---|---|
Returns first header that matches given name. |
||
|
name | Type: |
Returns
string | null
keys()
|
---|
Returns the names of the headers |
|
getAll()
|
||
---|---|---|
Returns list of header values for a given name. |
||
|
name | Type: |
Returns
string[] | null
append()
|
||||
---|---|---|---|---|
|
name | Type: |
value | Type: |
Returns
set()
|
||||
---|---|---|---|---|
|
name | Type: |
value | Type: |
Returns
delete()
|
||||
---|---|---|---|---|
|
name | Type: |
value | Type: Optional. Default is |
Returns
© 2010–2019 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v6.angular.io/api/common/http/HttpHeaders