Skip to content

Instantly share code, notes, and snippets.

@prombouts
Created October 22, 2017 19:00
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 prombouts/04610454758dfabe39547d01ac366789 to your computer and use it in GitHub Desktop.
Save prombouts/04610454758dfabe39547d01ac366789 to your computer and use it in GitHub Desktop.
Azure Function Example
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
namespace SogetiBotFunctions
{
public static class Test
{
[FunctionName("Test")]
public static async Task<object> Run([HttpTrigger("get", "post", WebHookType = "genericJson")]HttpRequestMessage req, TraceWriter log)
{
log.Info($"Webhook was triggered!");
return req.CreateResponse(HttpStatusCode.OK, new
{
greeting = $"Hello world!"
});
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment