'Sending JSON data as body element using POST method in Azure Function Powersell
I am creating Powershell azure function with the HTTP trigger. I am using the POST method and sending body requests as Object Array(JSON) in the Azure function(Test Environment). But I can not read, and request body data and I get 400 Bad Requests!
The request body in Azure function is:
{
"command": "GetUsersInGroup",
"add": [{"LoginName":"Test","Group":"TEst2"}]
}
Powershell Code in the Azure function Powershell
$adds = $Request.Body.add
write-Host "Request===>" $adds
$users = $adds | ConvertFrom-Json
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
