Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between creating azure function using HTTP triggers/generic webhooks?

I have created azure functions with "HTTP trigger" and "generic Webhooks" with Visual studio 2017.The only difference I found that both "triggers" can be triggered by HTTP request.

both functions have "HttpTrigger" as parameter. so I am confused when should we use one over the other as both triggers allows us to run small piece of code in cloud.

How Is it different from one another ?

like image 514
Kumari Dimple Avatar asked Mar 08 '23 21:03

Kumari Dimple


1 Answers

An HttpTriggered function can respond to any HTTP verb you configure. However, a webhook only responds to POST and expects the payload to be JSON.

Source: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook#responding-to-webhooks

This restricts requests to only those using HTTP POST and with the application/json content type.

like image 116
Cloud SME Avatar answered Apr 29 '23 04:04

Cloud SME