77040

Handling application/x-www-form-urlencoded posts

Question:

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?

Answer1:

As I mentioned in your related post <a href="https://stackoverflow.com/questions/36949872/configure-slack-authentication-token" rel="nofollow">here</a> not all of the various ASP.NET WebHook receivers are handled fully yet in Functions. We're currently only handling <strong>application/json</strong> WebHooks well at the moment, but not all of the other Content-Types. I've logged a new issue in our repo <a href="https://github.com/Azure/azure-webjobs-sdk-script/issues/317" rel="nofollow">here</a> to track this.

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

Answer2:

<a href="https://stackoverflow.com/questions/36441759/functions-js-file-not-a-webhook-webhooktype" rel="nofollow">This post</a> helped me. Azure Functions can support 3 types of webhooks

<ol><li>Generic JSON</li> <li>GitHub</li> <li>Slack</li> </ol>

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

<a href="https://i.stack.imgur.com/vsJEK.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/vsJEK.png" data-original="https://i.stack.imgur.com/vsJEK.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

Recommend

  • How to make seller pay the transaction fees when creating Paypal recurring subscription plan by usin
  • Lambda function failing with Unable to import module 'index'
  • set webhook for telegram bot and what is self sign certificate
  • GitLab webhooks to deploy master / production
  • How to use hash_hmac() with “SHA256withRSA” on PHP?
  • error on command “gsutil notification watchbucket… ”
  • Broadcast Receiver on Android Oreo
  • Shell scripts and the md5/md5sum command: need to decide when to use which one
  • Debugging/testing facebook messenger bot
  • Reading adjacency lists with isolated nodes using igraph
  • UML Sequence Diagram Message Branching
  • How to send products with text options to create order bigcommerce API?
  • Cannot convert a char value to money. The char value has incorrect syntax
  • Is there a chance to get -splash: work for SWT applications that require -XstartOnFirstThread?
  • include dlls in visual studio c++ 2008
  • C# List of Panels
  • R Split data.frame using a column that represents and on/off switch
  • Fail:(TESTMODE) Transactions of this market type cannot be processed on this system
  • How to return DataSet (xsd) in WCF
  • Why cepheus don't send int without quotes to orion?
  • How can I enlarge video fullscreen without the affected interface project in as3?
  • Custom Tabgroup Appcelerator
  • Custom validator control occupying space even though display set to dynamic
  • iOS: Detect app start via notification press
  • Initializer list vs. initialization method
  • Get object from AWS S3 as a stream
  • Cross-Platform Protobuf Serialization
  • Validaiting emails with Net.Mail MailAddress
  • Do I've to free mysql result after storing it?
  • json Serialization in asp
  • Free memory of cv::Mat loaded using FileStorage API
  • how does django model after text[] in postgresql [duplicate]
  • Memory offsets in inline assembly
  • embed rChart in Markdown
  • Cant find why the layout is getting smaller
  • Turn off referential integrity in Derby? is it possible?
  • How to get NHibernate ISession to cache entity not retrieved by primary key
  • How can I use `wmic` in a Windows PE script?
  • Unable to use reactive element in my shiny app
  • jQuery Masonry / Isotope and fluid images: Momentary overlap on window resize