Reputation: 17
I'm using an azure function with this single line powershell code to trigger Azure Runbook
Invoke-RestMethod -Method Post -Uri 'https://s16events.azure-automation.net/webhooks?token='
I want to do the same using C# language Azure Function
Upvotes: 0
Views: 716
Reputation: 30035
It's just a simple post request, there're a lot of examples, you can take a look at this one.
A simple code example:
using System.Net.Http;
HttpClient client = new HttpClient();
client.PostAsync("your_url", null).GetAwaiter().GetResult();
And just feel free to modify this code to meet your need.
Upvotes: 1