feat(http): implement Response.prototype.toString() to make for a nicer error message
Added a toString method to the Response class displaying status / status and the URL of the request. Closes: https://github.com/angular/http/issues/89 Closes #7511
This commit is contained in:
parent
1dcb663917
commit
89f61087c7
|
@ -114,4 +114,8 @@ export class Response {
|
|||
arrayBuffer(): any {
|
||||
throw new BaseException('"arrayBuffer()" method not implemented on Response superclass');
|
||||
}
|
||||
|
||||
toString(): string {
|
||||
return `Response with status: ${this.status} ${this.statusText} for URL: ${this.url}`;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue