How to pass parameters by POST to an Azure function?

前端 未结 9 1980
暗喜
暗喜 2020-12-24 05:27

I\'m trying to do a simple Azure Function to learn about it. There will be 3 functions:

  • 1 function to insert a row into a table of a database. This table will
9条回答
  •  粉色の甜心
    2020-12-24 06:12

    In case google took you here, this is how it's done in March 2019 (Azure Functions v3):

    public static async void Run(
                [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)]
                HttpRequest req,
                ILogger log)
            {
                var content = await new StreamReader(req.Body).ReadToEndAsync();
    
                MyClass myClass = JsonConvert.DeserializeObject(content);
                
            }
    

提交回复
热议问题