【发布时间】:2019-06-07 15:35:48
【问题描述】:
我有一个休息 api,我可以使用它发布和获取请求。但是当我想使用 put 和 delete 请求时,它返回错误 403。而且当我尝试使用 Postman 应用程序(用于 json 请求的应用程序)进行放置和删除时,一切正常。我真的很困惑。让我用一些截图来证明这个问题。 (出于安全考虑,我对链接进行了审查,对此深表歉意)
任何我的放置代码;
/** PUT: update the firm on the server */
updateFirm (firm: Firm): Observable<any> {
console.log(firm);
return this.http.put(this.firmUrl+"put/"+String(firm.id), firm, httpOptions).pipe(
tap(_ => console.log(`updated firm id=${firm.id}`)),
catchError(this.handleError<any>('updateFirm'))
);
}
如果您能帮助我,我将不胜感激。祝你有美好的一天
【问题讨论】:
-
你的后端使用什么语言?
标签: json angular typescript