Skip to content

Instantly share code, notes, and snippets.

@dontpaniclabsgists
Created October 31, 2017 15:48
Show Gist options
  • Save dontpaniclabsgists/fd69c627efbc1084daac1bd317aadb6f to your computer and use it in GitHub Desktop.
Save dontpaniclabsgists/fd69c627efbc1084daac1bd317aadb6f to your computer and use it in GitHub Desktop.
azure_functions_7_2
[FunctionName("GetWardrobe")]
public static async Task<HttpResponseMessage> Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)]HttpRequestMessage req, TraceWriter log)
{
log.Info("C# HTTP trigger function processed a request.");
var wardrobe = …
var json = JsonConvert.SerializeObject(wardrobe, Formatting.None);
return new HttpResponseMessage(HttpStatusCode.OK)
{
Content = new StringContent(json, Encoding.UTF8, "application/json")
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment