Creating a subscription

Now that you are familiar with endpoint validation topic, we can try to create a subscription once more:

  1. To do so, I created a function that is triggered by an HTTP request. I wrote it quickly in CSX, so I did not have to compile and deploy it manually:
#r "Newtonsoft.Json"using System.Net;using Newtonsoft.Json;public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log){ var @event = JsonConvert.DeserializeObject(await req.Content.ReadAsStringAsync()); log.Info(@event.ToString()); return req.CreateResponse(HttpStatusCode.OK);}

Thanks to the preceding code, I can see that a validation event was sent to an endpoint. Now, depending on the version of toolset you have, you will have the ...

Get Hands-On Azure for Developers 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.