Recommand · October 22, 2021 0

How to post json with Postman to Azure Functions?

  1. I can successfully perform Get with postman with url and get input value logged correctly (line 25). http://localhost:7071/api/orchestrators/CalculateOrchestrator?jsoninput=helloworld

  2. However I cannot get Post value logged. It is displayd "jsonInput = ‘None’". Is it issue with Postman or with Function code? Function bindings are for both Get and Post.

enter image description here

It’s an issue with your code. Neither postman nor function binding issue.
You are reading from the query params (line 18).
You should read it from the request body.

jsonString = req.get_body().decode(encoding='utf-8')

Please check for decoding bytes to object. get_body() returns bytes.