For a Mailchimp webhook, I had to parse the application/x-www-form-urlencoded
form data to JSON. Azure Functions does not automatically do this for you, so you have to provide your parser. I knew that I had already done this, so I went on a search journey through my code.
To make it easier next time, I wanted to share the code snippet with the rest of you. As you will notice, there isn’t a lot of code required.
|
|
This code snippet makes use of the qs (querystring) dependency. To install this dependency to your project, all you need to do is: npm i qs -S -E
.