卷曲命令不返回 [英] Curl command no return

查看:57
本文介绍了卷曲命令不返回的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 api,在此处找到的文档中:http://api.simplicate.nl/有一个示例 curl:

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.

推荐答案

您在 ..." 中使用了 Header,这是错误的.您必须使用双引号 "..."(不确定它叫什么,标准双引号?).

You are using Header inside "..." that is wrong. You have to use double quote "..." (not sure what it is called, standard double quote?).

所以应该是:

curl -H "Authentication-Key:XX" -H "Authentication-Secret:XX" https://mydomain.simplicate.nl/api/v2/crm/organization.json

请注意,目前您的 curl 正在发送带有额外字符的标题,如下所示.

As a note, currently your curl is sending the headers as following with extra characters.

"Authentication-Key:XX"
"Authentication-Secret:XX"

但应该是:

Authentication-Key:XX
Authentication-Secret:XX

这篇关于卷曲命令不返回的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆