简体   繁体   English

逻辑应用 Http POST 请求 UnsupportedMediaType 错误

[英]Logic App Http POST request UnsupportedMediaType error

I am getting the following error in my logic app:我的逻辑应用程序出现以下错误:

{ "type": "https://errors-api.cloud.com/common/unsupportedMediaType", "detail": "Content type '' not supported", "parameters": null } The following is my set up: { "type": "https://errors-api.cloud.com/common/unsupportedMediaType", "detail": "Content type '' not supported", "parameters": null }以下是我的设置:

在此处输入图像描述

This works in Postman.这适用于 Postman。 在此处输入图像描述

However, I noticed that in the Logic App if I add in a text in the Body section.但是,我注意到在逻辑应用程序中,如果我在正文部分添加文本。 For example "body".例如“身体”。 It works fine它工作正常在此处输入图像描述

The Body is not needed in the Postman so it's confusing to me why it needed in Logic app. Body 在 Postman 中不需要,所以我很困惑为什么在 Logic 应用程序中需要它。 Anyone come across similar issue?有人遇到过类似的问题吗?

Issue is with content-type in your case.在您的情况下,问题出在内容类型上。 I have tried to reproduce issue from my side, but I did not get any error.我试图从我这边重现问题,但我没有收到任何错误。 I have found similar issue like you in link我在链接中发现了与您类似的问题

Also, can you add Accept as shown below in header request,另外,您能否在 header 请求中添加如下所示的接受,

Accept:*/*
  1. I have created logic app as shown below,我创建了如下所示的逻辑应用程序,在此处输入图像描述
  2. In Get Bearer Token, getting access token from authentication url,在 Get Bearer Token 中,从身份验证 url 获取访问令牌,在此处输入图像描述
  3. Using access token from Get bearer token getting data from api as shown below,使用来自 Get bearer token 的访问令牌从 api 获取数据,如下所示,在此处输入图像描述
  4. The logic app ran successfully,逻辑应用成功运行,在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM