I have the following call that works well on postman:
{
"action": {
"name": "<action_name>",
"parameters": [
{
"<Parmater1>": "",
"<Parameter2>": "",
"from_date": "<date>",
"to_date":"<date>"
}
],
"session_token": "xxxx..."}
}
In order to use this call in Powershell I have created the following:
Invoke-restmethod -method Get -uri $Uri -body $body -ContentType "application/json"
but then I receive the following error:
Invoke-restmethod : Cannot send a content-body with this verb-type.
How can I invoke this call without the Body parameter?
How can I send the Parameters as query?
I have also tried using the CURL in powershell:
curl.exe -G GET -H "Content-Type: application/json" -d $data -u $url
and received the following error:
curl.exe : curl: (3) URL using bad/illegal format or missing URL