fix(http): return empty string if no body is present (#10668)

This commit is contained in:
Daniel Leib
2016-08-12 06:40:18 +02:00
committed by vikerman
parent 2d520ae7e7
commit 7cd4741fcb
2 changed files with 15 additions and 0 deletions

View File

@ -49,6 +49,10 @@ export abstract class Body {
return String.fromCharCode.apply(null, new Uint16Array(<ArrayBuffer>this._body));
}
if (this._body === null) {
return '';
}
if (isJsObject(this._body)) {
return Json.stringify(this._body);
}