fix(Http): add support for headers
This commit is contained in:

committed by
Jeff Cross

parent
d381c5fc8a
commit
883b506445
@ -45,6 +45,11 @@ export class XHRConnection implements Connection {
|
||||
ObservableWrapper.callNext(this.response, new Response(responseOptions))
|
||||
});
|
||||
// TODO(jeffbcross): make this more dynamic based on body type
|
||||
|
||||
if (isPresent(req.headers)) {
|
||||
req.headers.forEach((value, name) => { this._xhr.setRequestHeader(name, value); });
|
||||
}
|
||||
|
||||
this._xhr.send(this.request.text());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user