问题
Im working with an api, in the documentaion found here: http://api.simplicate.nl/ There is an example curl:
`curl -H “Authentication-Key: {API Key}” -H “Authentication-Secret:{API secret}” https://{subdomain}.simplicate.nl/api/v2/crm/organization.json`
I ran that code like this in terminal:
curl -H “Authentication-Key:XX” -H “Authentication-Secret:XX” https://mydomain.simplicate.nl/api/v2/crm/organization.json
It runs but returns nothing.
回答1:
You are using Header inside “...”
that is wrong. You have to use double quote "..."
(not sure what it is called, standard double quote?).
So it should be:
curl -H "Authentication-Key:XX" -H "Authentication-Secret:XX" https://mydomain.simplicate.nl/api/v2/crm/organization.json
As a note, currently your curl is sending the headers as following with extra characters.
“Authentication-Key:XX”
“Authentication-Secret:XX”
But it should be:
Authentication-Key:XX
Authentication-Secret:XX
来源:https://stackoverflow.com/questions/40802439/curl-command-no-return