Custom Invoke Azure WebJob



How to Make a Web job triggering POST request  

Url format is
https://{sitename}.scm.azurewebsites.net/api/triggeredwebjobs/{webjobname}/run

You'll need to add basic auth header with your deployment credentials.



Server side triggering code
------------------------------------

   private async void postmethod()
        {
            using (var client = new HttpClient())
            {
                var values = new List<KeyValuePair<string, string>>();

                var content = new FormUrlEncodedContent(values);
                client.DefaultRequestHeaders.TryAddWithoutValidation("Authorization", "{Basic auth code }");

                var response = await client.PostAsync("https://{sitename}.scm.azurewebsites.net/api/triggeredwebjobs/{webjobname}/run", content);

                var responseString = await response.Content.ReadAsStringAsync();
            }

        }

Search This Blog

Arsip Blog

Powered by Blogger.

Recent

Comment

Author Info

Like This Theme

Popular Posts

Video Of Day

jishnukanat@gmail.com

Sponsor

Most Popular