当我在终端
中运行时curl https://api.box.com/2.0/folders/{id}/items?limit=100&offset=0 -H "Authorization: Bearer access_token"
有效的access_token它给了我这个回复。
If '-H' is not a typo you can run the following command to lookup the package that contains the binary:
command-not-found -H
-bash: -H: command not found
我正在使用SUSE Linux Enterprise Server 11 SP3。
答案 0 :(得分:1)
您提及的所有这些字符都必须进行转义,以防止它们被bash解释。
例如,而不是:
curl https://www.example.com/r?v=1&w=2
您需要使用:
curl https://www.example.com/r\?v=1\&w=2
^^ ^^
在你的情况下:
curl https://api.box.com/2.0/folders/\{id\}/items\?limit=100\&offset=0 -H "Authorization: Bearer access_token"
^^ ^^ ^^ ^^