angular-cn/public/docs/js/latest/api/http/Headers-class.jade

197 lines
2.5 KiB
Plaintext
Raw Normal View History

p.location-badge.
exported from <a href='../http'>angular2/http</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.32/modules/angular2/src/http/headers.ts#L16-L110">angular2/src/http/headers.ts (line 16)</a>
:markdown
Polyfill for [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers/Headers), as
specified in the [Fetch Spec](https://fetch.spec.whatwg.org/#headers-class). The only known
difference from the spec is the lack of an `entries` method.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(headers?: Headers | StringMap&lt;string, any&gt;)
:markdown
.l-sub-section
h3 append
pre.prettyprint
code.
append(name: string, value: string)
:markdown
Appends a header to existing list of header values for a given header name.
.l-sub-section
h3 delete
pre.prettyprint
code.
delete(name: string)
:markdown
Deletes all header values for the given name.
.l-sub-section
h3 forEach
pre.prettyprint
code.
forEach(fn: Function)
:markdown
.l-sub-section
h3 get
pre.prettyprint
code.
get(header: string)
:markdown
Returns first header that matches given name.
.l-sub-section
h3 has
pre.prettyprint
code.
has(header: string)
:markdown
Check for existence of header by given name.
.l-sub-section
h3 keys
pre.prettyprint
code.
keys()
:markdown
Provides names of set headers
.l-sub-section
h3 set
pre.prettyprint
code.
set(header: string, value: string | List&lt;string&gt;)
:markdown
Sets or overrides header value for given name.
.l-sub-section
h3 values
pre.prettyprint
code.
values()
:markdown
Returns values of all headers.
.l-sub-section
h3 getAll
pre.prettyprint
code.
getAll(header: string)
:markdown
Returns list of header values for a given name.
.l-sub-section
h3 entries
pre.prettyprint
code.
entries()
:markdown
This method is not implemented.