Create a gist now

Instantly share code, notes, and snippets.

using System;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
public static async Task PostAzureFunction()
{
var azureFunctionUrl = "https://<FunctionAppName>.azurewebsites.net/api/<FunctionName>?code=<Functionごとに一意な文字列>";
var payload = new
{
key = "value"
};
var jsonString = JsonConvert.SerializeObject(payload);
await client.PostAsync(azureFunctionUrl, new StringContent(jsonPayload, Encoding.UTF8, "application/json"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment