Created
June 5, 2017 00:27
-
-
Save leomicheloni/2dc9c826e7eea227ede1fbbe066d9c18 to your computer and use it in GitHub Desktop.
Simple Azure function
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
public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log) | |
{ | |
string name = req.GetQueryNameValuePairs() | |
.FirstOrDefault(q => string.Compare(q.Key, "name", true) == 0) | |
.Value; | |
return req.CreateResponse(HttpStatusCode.OK, "Hello " + name); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment