Created
May 4, 2017 04:23
-
-
Save sakapon/2f45241aaa75f0e439434b3c8d03ebb4 to your computer and use it in GitHub Desktop.
AzureFunctionsSample / GetRandomNumber
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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