Many services such as Git, VSTS, Dropbox, PayPal, and others provide a provision to subscribe to WebHooks. Every WebJob is exposed with a WebHook, and the URL and credentials are accessible from the Properties page of WebJobs.
To use WebHooks with WebJobs, we have to add a NuGet package, Microsoft.Azure.WebJobs.Extensions.WebHooks, and then use WebHooks in the Main method, as follows:
class Program { static void Main() { var config = new JobHostConfiguration(); if (config.IsDevelopment) { config.UseDevelopmentSettings(); } config.UseWebHooks(); var host = new JobHost(config); host.RunAndBlock(); } }
We will modify our WebJob and add another method, which will be hooked up when the WebHook is ...