angular - 错误:未捕获(承诺):HttpErrorResponse: {"headers":{"normalizedNames":[],"statusText":"Bad Request"} 仅在 Safari 浏览器上
问题描述
在 Safari 浏览器上调用 PUT 方法时,Angular 应用程序出现以下错误,但在 Chrome 浏览器上也可以正常工作。
returnData = await this.http.put(applicationUrl, formattedData).toPromise();
[Error] Failed to load resource: the server responded with a status of 503 (Service Unavailable)
(pixel, line 0)
[Error] Failed to load resource: the server responded with a status of 503 (Service Unavailable)
(setuid, line 0)
[Error] Failed to load resource: the server responded with a status of 400 (Bad Request) (11929, line 0)
[Error] Error: Uncaught (in promise): HttpErrorResponse:
{"headers":{"normalizedNames":[],"lazyUpdate":null},"status":400,"statusText":"Bad Request","url":"http://localhost:4200/api/application/11929","ok":false,"name":"HttpErrorResponse","message":"Http failure
解决方案
推荐阅读
- json - 如果多个键具有指定值,则使用 jq 返回布尔值
- django - Django 超级用户创建无响应
- java - 当我运行'cordova build android'时,我不断收到“无法运行”javac -version””
- jquery - 如何在 django 中使用 jquery 更改多个图像 src
- java - 迭代所有无平方复合材料 < L
- c# - 按索引访问实体框架表列
- java - 如何将 RecyclerView 放入 Fragment?
- php - 如何通过 html 表单将文件发送到 $_FILE?
- angular - Identity Server身份验证后如何关闭signinPopup()窗口oidc-client Angular
- php - 如何以 JSON 格式返回响应 - Codeigniter