【发布时间】:2019-04-03 13:43:03
【问题描述】:
服务器不可用时如何处理正确的http post响应?
现在我发送如下请求:
this.requestMethods.SendCurrentStep(this.formRegister.currentForm().index).subscribe(() => {
// TODO
});
// Code below is not executed father
方法是:
public SendCurrentStep(step: number): Observable<any> {
return this.http.post('https://localhost:9090/NotAvailableUrl', {
'step' : step
})
.map(res => (<any>res)._body === '' ? {} : res)
.catch(this.handleError);
}
【问题讨论】:
标签: javascript angular angular7