json - 如何在 Azure Scheduler 中创建 JSON POST 作业

标签 json azure asp.net-web-api azure-scheduler

我习惯使用 Fiddler,所以我可能错过了一些简单的东西,但是......我需要在 Azure 中创建一个计划作业,以便每月发布到 API。一切都很顺利,直到我尝试输入正文内容:

enter image description here

当 Azure 尝试创建作业时,它返回错误并无法创建它:

At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details. (Code: DeploymentFailed)

Content-Type must be provided with body (Code: BadRequest)

我不知道出了什么问题,因为内容类型显然在那里。有人可以帮我吗?

最佳答案

用户错误 101。Content-Type: application/json 应作为 header 应用,而不是在正文结构中:

enter image description here

感谢@Jack Zeng 的评论。

关于json - 如何在 Azure Scheduler 中创建 JSON POST 作业,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38102339/

相关文章:

java - 使用 java-json 连接 JSON 元素

azure - 尽管低于配额,但无法在 Azure 中创建新的服务主体

c# - 根据 roles/api_key 生成 Swashbuckle API 文档

azure - 使用 Azure Key Vault 时如何从客户端隐藏 API key ?

ASP.NET Web API、Web 服务发现和客户端创建

c# - C# 应用程序的 HttpClient

java - 如何使用 ArrayAdapter (Java) 将数据插入 MySQL 服务器?

android - Android 上的 Google Book Api 访问失败

json - 多行 YAML Json

azure - 将对 Azure 应用程序 (WebApi) 的访问限制为仅另一个 Azure 应用程序(守护程序客户端)