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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.