I'm looking to execute the following POST command in powershell, passing in the body as the parameter
$request = Invoke-Restmethod -TimeoutSec 600 -URI 'http://<servername>:5000/api/test/test' -Method POST -Body "aum_date_str:2020-09-16" -ContentType "application/json"
but it fails with an invalid json format error ...
Invoke-Restmethod : {
"type": "about:blank",
"title": "Bad Request",
"detail": "Request body is not valid JSON",
"status": 400
}
I have verified the json format and it's fine. Any ideas why this error is occurring?