curl
curl "https://api.wanikani.com/v2/summary" \ -H "Wanikani-Revision: 20170710" \ -H "Authorization: Bearer <API-KEY>"
此命令返回预期的json。
Python代码
import requests
headers = {"Wanikani-Revision": "20170710", "Authorization": "Bearer <API-KEY>"}
res = requests.post('https://api.wanikani.com/v2/summary', headers = headers)
print(res.text)
此代码返回404。{“错误”:“未找到”,“代码”:404}
1条答案
按热度按时间brqmpdu11#
该函数只接受GET。请查看https://docs.api.wanikani.com/20170710/#summary
请尝试: