如果服务器关闭,我的catch错误方法没有捕获错误。
let headers = new Headers({ 'Content-Type': 'application/json' });
let options = new RequestOptions({ headers: headers });
return this.http.post(this.PATH + '/signup', details, options)
.map(res => res.json())
.catch(res => Observable.throw(res['_body']));