Skip to content

Instantly share code, notes, and snippets.

@leomicheloni
Created June 5, 2017 00:27
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 leomicheloni/2dc9c826e7eea227ede1fbbe066d9c18 to your computer and use it in GitHub Desktop.
Save leomicheloni/2dc9c826e7eea227ede1fbbe066d9c18 to your computer and use it in GitHub Desktop.
Simple Azure function
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