Skip to content

Instantly share code, notes, and snippets.

@sakapon
Created May 4, 2017 04:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sakapon/2f45241aaa75f0e439434b3c8d03ebb4 to your computer and use it in GitHub Desktop.
Save sakapon/2f45241aaa75f0e439434b3c8d03ebb4 to your computer and use it in GitHub Desktop.
AzureFunctionsSample / GetRandomNumber
using System.Net;
static readonly Random random = new Random();
public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log)
{
log.Info("C# HTTP trigger function processed a request.");
var n = random.Next(1, 10000);
return req.CreateResponse(HttpStatusCode.OK, n);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment