Troubleshooting
Problem
To get a report output from a Guardium collector by using the REST API,
executed a curl command like:
curl -k --header "Authorization: Bearer 17161940-3af8-430c-935f-53d0ba21124e" -i -H "Content-Type: application/json" -X POST -d '{"quey":"parameters"}' https://
Symptom
json format error at curl command
Cause
There is a specific problem between an interaction of Windows
Command Prompt and curl regarding the handling of quotes.
Environment
Curl version curl 7.37.0 (x86_64-pc-win32)
libcurl/7.37.0
Diagnosing The Problem
The curl command with the following format works well on Linux platform but it fails on Windows
curl . . . -d '{"your":"query"}'
Resolving The Problem
From the Windows we have to use the following format:
curl ... -d "{'your':'query'}"
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21691351