0

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?

Sean Feldman
  • 23,443
  • 7
  • 55
  • 80

2 Answers2

2

As I mentioned in your related post here not all of the various ASP.NET WebHook receivers are handled fully yet in Functions. We're currently only handling application/json WebHooks well at the moment, but not all of the other Content-Types. I've logged a new issue in our repo here to track this.

We'll address those issues soon. Feel free to track the progress and chime in more in our issues list. Thanks :)

mathewc
  • 13,312
  • 2
  • 45
  • 53
1

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

  1. Generic JSON
  2. GitHub
  3. Slack

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
}

or via UI

enter image description here

Community
  • 1
  • 1
Sean Feldman
  • 23,443
  • 7
  • 55
  • 80