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

194 lines
2.4 KiB
Plaintext

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.37/modules/angular2/src/http/headers.ts#L9-L103">angular2/src/http/headers.ts (line 9)</a>
:markdown
The http module provides services to perform http requests. To get started, see the <a href='Http-class.html'><code>Http</code></a>
class.
.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 | string[])
: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.