This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Call Invoke webmethod in Quest one activeroles

Hi ,

 

I need to call the below method in Quest one . it is working fine with the powershell when I use the same in Questone it is throwing an error like 

The 'Accept' header must be modified using the appropriate property or method

 

$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"

$headers.Add('Authorization',('Basic {0}' -f $base64AuthInfo))

$headers.Add('Accept','application/json')

$headers.Add('Content-Type','application/json')

Invoke-WebRequest -Headers $headers -Method $methodPost -Uri $uriPost -Body $bodyJson

 

 

Please let me know how to fix this ?