![](/img/trans.png)
[英](415) Unsupported Media Type : Same script works on my laptop but not on azure runbook ((415) Unsupported Media Type)
[英]Angular 13: 415 Error Unsupported Media Type, on Delete
我的 Services.ts
deteleComentario(id: number): Observable<any>{
return this.http.delete(this.myAppUrl + this.myApiUrl + id);
}
我的列表-評論-Component.ts
eliminarComentario(id: any ){
this.comentarioService.deteleComentario(id).subscribe(data => {
this.getComentarios();
}, error => {
console.log(error);
}
);
}
而我的 Api、NetCore 和 Mysql 在 GET、POST、GET{ID}、PUT{ID}、DELETE{ID} 任何建議中都可以正常工作
415 Unsupported Media Type是客戶端錯誤,指示請求實體具有服務器或資源不支持的媒體類型。 如果服務器不支持請求正文的內容,仍可能返回響應代碼。 例如,服務器可能支持特定的 JSON 主體,但有效負載內容未驗證,可能是因為它缺少必需的屬性。
例如,客戶端上傳不是其中一種格式(例如JPEG、PNG)的圖像,或不是可接受格式(例如MPEG)的視頻。 修復它的最佳方法是刪除圖像或視頻並以其中一種格式上傳文件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.