Curl command no return

烈酒焚心 提交于 2021-02-10 05:49:29

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!