静态方法
|
---|
Returns a new Headers instance from the given DOMString of Response Headers |
static fromResponseHeaderString(headersString: string): Headers参数headersString | Type: string . |
返回值Headers
|
构造函数
constructor(headers?: Headers | { [name: string]: any; } | null)参数headers | Type: Headers | {
[name: string]: any;
} | null . 可选. 默认值是 undefined . |
|
方法
|
---|
Appends a header to existing list of header values for a given header name. |
append(name: string, value: string): void参数name | Type: string . | value | Type: string . |
返回值void
|
|
---|
Deletes all header values for the given name. |
delete(name: string): void参数返回值void
|
|
---|
forEach(fn: (values: string[], name: string | undefined, headers: Map<string, string[]>) => void): void参数fn | Type: (values: string[], name: string | undefined, headers: Map) => void . |
返回值void
|
|
---|
Returns first header that matches given name. |
get(name: string): string | null参数返回值string | null
|
|
---|
Checks for existence of header by given name. |
has(name: string): boolean参数返回值boolean
|
|
---|
Returns the names of the headers |
keys(): string[]参数没有参数。 返回值string[]
|
|
---|
Sets or overrides header value for given name. |
set(name: string, value: string | string[]): void参数name | Type: string . | value | Type: string | string[] . |
返回值void
|
|
---|
Returns values of all headers. |
values(): string[][]参数没有参数。 返回值string[][]
|
|
---|
Returns string of all headers. |
toJSON(): { [name: string]: any; }参数没有参数。 返回值`{ }` |
|
---|
Returns list of header values for a given name. |
getAll(name: string): string[] | null参数返回值string[] | null
|
|
---|
This method is not implemented. |
entries()参数没有参数。 |