如果我将此网址放在浏览器搜索栏中,则会返回JSON:
https://api.bitbucket.org/2.0/repositories/interos/{b89131e7-a658-4bef-93b3-e4c90a13b0cf}/commits/
但是如果我像这样使用cURL:
curl -H "Accept: application/json" -u "${bitbucket_email}:${bitbucket_password}" https://api.bitbucket.org/2.0/repositories/interos/{b89131e7-a658-4bef-93b3-e4c90a13b0cf}/commits/
然后,我似乎找回了HTML(带有或不带有Accept标头)
有人知道为什么我得到HTML而不是JSON吗?
我试图在这里关注宁静的API文档: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/commits