@Gurram, Munisekhar Based on the error message, looks like the req_body
is a string, likely because the JSON payload is double serialized.
You either must fix this in the client or add a check like this to make sure it is a dictionary
import json
def main(req: func.HttpRequest) -> func.HttpResponse:
try:
req_body = req.get_json()
print(req_body)
if isinstance(req_body, str):
req_body = json.loads(req_body)
project_id = req_body.get("project_id", None)
print(project_id)
except ValueError:
filterdata = {}
else:
update_flag = req_body.get("update", 0)
filterdata = req_body.get("filterdata", {})