【发布时间】:2018-05-10 18:57:01
【问题描述】:
我有以下代码,我使用 Angular 5 中的 http.post() 方法通过 REST API 使用数据。
return this._http.post(this.basePath,null, {
headers: this.myHeaders,
params: {
transaction_id : "22"
} ,
observe: 'response',
responseType: 'json'
})
.catch(this._errorHandler);
我可以使用 http.get() 成功获取数据,但是使用 post 时我得到 500(内部服务器错误)。
我可能缺少什么?
【问题讨论】:
标签: http http-post httpclient angular5