Closed RicoSuter closed 5 years ago
Yeah, that's because currently the discovery works by first trying to search for a parameter with the type HttpRequest and if it finds it, proceeds to get the trigger attribute from it:
var httpRequestParameter = method.GetParameters()
.SingleOrDefault(x => x.ParameterType.Name == "HttpRequest");
var httpTriggerAttribute = httpRequestParameter?.GetCustomAttributes()
.SingleOrDefault(x => x.GetType().Name == "HttpTriggerAttribute");
The main thing discovery wise is to find the HttpTriggerAttribute, and I suppose we could just check for any parameter having that attribute as that's mostly what matters.
Ok, so there is currently no workaround or way to use this function at the moment?
I'm afraid not, until a change to the discovery method is made.
Fixing this as we speak. If you don't mind me asking, what's the use case? I haven't realized you could use something else than the HttpRequest in the signature.
If you use an own class instead of HttpRequest for a POST function it will deserialize the JSON body to this class...
Alright, the issue should now have been fixed and v1.1.3 should be available from Nuget momentarily.
Thank you very much. Ill try it out tomorrow.
Looks good now. Thank you.
This function
does not show up in the spec.
If i change
WebhookBodyRequest request
toHttpRequest request
then it shows up. Am I missing something?