Azure / Azure-Functions

1.11k stars 197 forks source link

Fix webhook sample in C# class library article #530

Open lindydonna opened 7 years ago

lindydonna commented 7 years ago

Customer left this note in LiveFyre on this article (https://docs.microsoft.com/en-us/azure/azure-functions/functions-dotnet-class-library)

I think there's a bug in the example for "HTTP and webhooks". The [HttpTrigger] is missing a methods argument and because of this the example returns "404 Not Found". More details here: https://stackoverflow.com/questions/44500099/why-am-i-getting-a-404-when-i-run-my-azure-function-locally

A fix might look like: [HttpTrigger(AuthorizationLevel.Anonymous, "GET", WebHookType = "genericJson")]

We could just use the same code that's in the template: https://github.com/Azure/azure-webjobs-sdk-templates/blob/dev/Functions.Templates/Templates/GenericWebHook-CSharp/GenericWebHookCSharp.cs#L24

ColbyTresness commented 5 years ago

@ggailey777 @craigshoemaker