Is it possible to automatically bind a model in a parameter in Azure Functions? Similar to how it is done in WebApi controllers? Essentially, when a post body is received, it would be automatically deserialized. And when a query is received, it would also be automatically deserialized. Alternatively, do you have a reliable manual implementation for doing this? Thanks.
2
Answers
POST in Azure Functions:
GET in Azure Functions:
NOTE: If you need to send body in a GET request there is something wrong with the logic. In HTTP, GET method is specifically defined to not to include a request body.
I hope it helps. Alternatively, add header deserialization.
Query – Get
Body – Post