azure - HTTP 请求/服务总线 - application/x-www-form-urlencoded 不支持错误

标签 azure azureservicebus azure-logic-apps

我有一个非常简单的逻辑应用程序:

  • HTTP 请求(用作 Slack 的端点 Web Hook )
  • 将请求从 Slack (URI) 发送到服务总线队列

我没有在逻辑应用中进行任何更改,但发送消息操作突然开始报告此错误:

Decoding as string is not supported for content envelope of type 
'application/x-www-form-urlencoded'.

发送消息的定义如下:

"Send_message": {
                "inputs": {
                    "body": {
                        "Label": "@{triggerBody()}"
                    },
...

我只看到请求输出的差异:

之前

Headers
{
  "Accept": "*/*",
  "User-Agent": "Slackbot,1.0,(+https://api.slack.com/robots)",
  "Content-Type": "application/x-www-form-urlencoded"
  ...
}
Body
{
  "$content-type": "application/x-www-form-urlencoded",
  "$content": "dG9r..."
}

现在

Headers
{
  "Accept": "*/*",
  "User-Agent": "Slackbot,1.0,(+https://api.slack.com/robots)",
  "Content-Type": "application/x-www-form-urlencoded"
   ...
}

Body
{
  "$content-type": "application/x-www-form-urlencoded",
  "$content": "dG9r...",
  "$formdata": [
    {
      "key": "token",
      "value": "..."
    },
    {
      "key": "team_id",
      "value": "..."
    },
    {
      "key": "trigger_word",
      "value": "!"
    },
    ...
  ]
}

$formdata 现在是 Request 输出的一部分,作为包含所有查询参数的 JSON 数组。

有人有什么想法吗?我将非常感谢任何帮助使其再次正常工作。

编辑:西欧已修复并正在运行

最佳答案

是的,为了在运行时中对 x-www-form-urlencoded 数据提供 native 支持,最近发布了一个错误。我们现在正在回滚并修补。您能否向我发送电子邮件,以便我们针对您所在的区域进行修复并分享解决方法?提前致歉 - 作为一般规则,我们永远不想发布任何会破坏现有逻辑应用程序的东西。在这种情况下,在表单数据周围添加一些新的元数据不再允许人们对 x-www-form-urlencoded 数据进行字符串化(这就是您在这里所做的)。

关于azure - HTTP 请求/服务总线 - application/x-www-form-urlencoded 不支持错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41853152/

相关文章:

azure - 在逻辑应用中将电子邮件处理为另一封电子邮件的附件

powershell - 如何异步执行或并行化 Azure PowerShell 操作以节省时间?

linux - Azure Docker Web App - 无法更新容器设置的数据

azure - 如何在 Quarkus 中连接到 Azure ServiceBus

azure - 清理过时的 Azure 服务总线主题订阅

azure-logic-apps - 逻辑应用 : HTTP trigger and response time out

azure - 逻辑应用: Finding element in Json Object array (like XPath fr XML)

rest - Azure 调度程序 -;底层连接已关闭: Could not establish trust relationship for the SSL/TLS secure channel

Azure Active Directory 域服务 DNS 转发

c# - 如何确定 EventData 的序列化大小以进行批处理?