本文介绍了处理申请/x-www-form-urlencoded帖子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试与Slack集成,该Slack将传出的Webhooks发送为application/x-www-form-urlencoded,而不是预期的application/json.有什么方法允许Azure功能接受一个可以处理application/x-www-form-urlencoded数据的Webhook(C#)?

Trying to integrate with Slack that sends outgoing webhooks as application/x-www-form-urlencoded and not as an expected application/json. Any way to allow Azure Fucntions to accept a webhook (C#) that would process application/x-www-form-urlencoded data?

推荐答案

此帖子帮助了我.Azure Functions可以支持3种类型的Webhooks

This post helped me.Azure Functions can support 3 types of webhooks

  1. 通用JSON
  2. GitHub
  3. 松弛

负责绑定的

functions.json文件可以直接操作

functions.json file responsible for bindings can be manipulated directly

{
  "bindings": [
    {
      "type": "httpTrigger",
      "direction": "in",
      "webHookType": "genericJson",
      "name": "req"
    },
    {
      "type": "http",
      "direction": "out",
      "name": "res"
    }
  ],
  "disabled": false
}

或通过用户界面

这篇关于处理申请/x-www-form-urlencoded帖子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-27 04:07