Using WebHook of WebJob from VSTS

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 ...

Get Enterprise Application Architecture with .NET Core now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.