chiefbag Guru
Joined: 01 Oct 2010 Posts: 542 Location: The Kingdom
|
Posted: Fri Oct 25, 2013 9:31 am Post subject: [SOLVED] Curl question |
|
|
I am having some trouble extracting a json array from a site using curl.
My attempts appear to be failing at the authentication stage, it obviously must be due to my malformed curl command.
The below example works fine from a browser:
Code: | https://www.xyz.xyz/api/json/fdr?client.serial=12345&auth=password |
This is my curl version which does not work:
Code: | curl -i -sslv3 -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d '{"client.serial":"12345", "auth":"password"}' https://www.xyz.xyz/api/json/fdr |
The error I recieve from the server when attempting with curl is as below, I can get the exact same error in the browser by passing in bad auth credentials
Code: | {"error":{"message":"Authentication failed","description": .... |
Any ideas where Im going wrong?
Last edited by chiefbag on Fri Oct 25, 2013 1:50 pm; edited 1 time in total |
|