I've been reading about Cisco ACI Automation with cURL here and trying to follow the same steps.
Unfortunately, the code doesn't work on cURL. I'm getting the following error.
C:\>curl -X POST -k https://x.x.x.x/api/aaaLogin.json -d '{"aaaUser":{"attributes":{"name":"user007","pwd":"password007"}}}'
{"totalCount":"1","imdata":[{"error":{"attributes":{"code":"400","text":"JSON parsing failed - incomplete attribute value at line: 1"}}}]}
C:\>
However, when I test the same code using Postman, it's working like a charm. What was wrong with the curl command?
Note: I did not put -c cookie.txt
in this example as I'm getting the same error even if it's there.
Desired Output
Getting proper HTTP 200 response, not 400 Bad Request ..