How to pass parameters by POST to an Azure function?

前端 未结 9 1973
暗喜
暗喜 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:32

    The query string (name/value pairs) is by default sent in the HTTP message body of a POST request and not as query string. The GetQueryNameValuePairs method will parse the query string and will by default not work with POST request.

    For the POST request you could use something similar to this:

    var content = request.Content;
    string contentInString = content.ReadAsStringAsync().Result;
    

提交回复
热议问题