return super.post(this.getFullUrl(url), body, this.requestOptions())
.catch(this.onCatch.bind(this))
.do((res: Response) => {
this.onSubscribeSuccess(res);
}, (error: any) => {
this.onSubscribeError(error);
})
.finally(() => {
this.onFinally();
});
我想将此代码转换为Angular版本7.1.0
3 回答
试试这种方式
这是我的一个帖子请求参考,如果这有帮助:
更好的方法: