export class Headers
export class Headers
exported from angular2/http defined in angular2/src/http/headers.ts (line 16)
Polyfill for Headers, as specified in the Fetch Spec.
The only known difference between this Headers
implementation and the spec is the
lack of an entries
method.
Example (live demo)
Constructor
constructor(headers?: Headers | {[key: string]: any})
constructor(headers?: Headers | {[key: string]: any})
Not Yet Documented
Members
append(name: string, value: string) : void
append(name: string, value: string) : void
Appends a header to existing list of header values for a given header name.
delete(name: string) : void
delete(name: string) : void
Deletes all header values for the given name.
forEach(fn: (values: string[], name: string, headers: Map<string, string[]>) => void) : void
forEach(fn: (values: string[], name: string, headers: Map<string, string[]>) => void) : void
Not Yet Documented
get(header: string) : string
get(header: string) : string
Returns first header that matches given name.
has(header: string) : boolean
has(header: string) : boolean
Check for existence of header by given name.
keys() : string[]
keys() : string[]
Provides names of set headers
set(header: string, value: string | string[]) : void
set(header: string, value: string | string[]) : void
Sets or overrides header value for given name.
values() : string[][]
values() : string[][]
Returns values of all headers.
toJSON() : string
toJSON() : string
Returns string of all headers.
getAll(header: string) : string[]
getAll(header: string) : string[]
Returns list of header values for a given name.
entries()
entries()
This method is not implemented.