Skip to content

Instantly share code, notes, and snippets.


kasunkv/run.csx Secret

Last active June 25, 2017 07:44
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Azure Functions: ReceiveNotification Function Initial State.
#r "Newtonsoft.Json"
using System;
using System.Net;
using Newtonsoft.Json;
public static async Task<object> Run(HttpRequestMessage req, TraceWriter log)
log.Info($"Notification Received.");
string jsonContent = await req.Content.ReadAsStringAsync();
var notification = JsonConvert.DeserializeObject<Notification>(jsonContent);
return req.CreateResponse(HttpStatusCode.OK, new
message = $"Notification Request Received From: {notification.Email}"
public class Notification {
public string NotificationId { get; set; }
public string Email { get; set; }
public string Subject { get; set; }
public string Content { get; set; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment