1#r "Newtonsoft.Json"
2
3using System.Net;
4using Newtonsoft.Json;
5
6public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log)
7{
8 dynamic body = await req.Content.ReadAsStringAsync();
9 var e = JsonConvert.DeserializeObject<EventData>(body as string);
10 return req.CreateResponse(HttpStatusCode.OK, JsonConvert.SerializeObject(e));
11}
12
13public class EventData
14{
15 public string Category { get; set; }
16 public string Action { get; set; }
17 public string Label { get; set; }
18}