Created
October 22, 2017 19:00
-
-
Save prombouts/04610454758dfabe39547d01ac366789 to your computer and use it in GitHub Desktop.
Azure Function Example
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; | |
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