feat(http): set the statusText property from the XMLHttpRequest instance

Closes #4162
This commit is contained in:
Aliaksei Palkanau
2015-09-13 19:31:56 +03:00
committed by Misko Hevery
parent 7a80f0d1e1
commit 3019140e7e
2 changed files with 37 additions and 1 deletions

View File

@ -58,7 +58,10 @@ export class XHRConnection implements Connection {
if (status === 0) {
status = body ? 200 : 0;
}
var responseOptions = new ResponseOptions({body, status, headers, url});
let statusText = _xhr.statusText || 'OK';
var responseOptions = new ResponseOptions({body, status, headers, statusText, url});
if (isPresent(baseResponseOptions)) {
responseOptions = baseResponseOptions.merge(responseOptions);
}