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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.