在写个人博客,尝试使用Django RestFrameWork + JWT验证,在httpie命令行使用命令
http put http://127.0.0.1:8000/api/comment/8/ parent_id
=6 article_id=11 content='comment to parent comment 6' "Authorization: Bearer eyJ0eXAiOiJK
>> IiwidXNlcl9pZCI6M30.l3Za4JHTW230WXjdWFSv8vWrVHs8kNS-tDkn2EKvvkg"
报错http: error: InvalidHeader: Invalid return character or leading space in header: Authoriza
tion
只要把“Authorization...”前面的空格删除即可,命令行其实会在错误的地方标蓝提示你
http put http://127.0.0.1:8000/api/comment/8/ parent_id
=6 article_id=11 content='comment to parent comment 6'"Authorization: Bearer eyJ0eXAiOiJKV
1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIj
>> IiwidXNlcl9pZCI6M30.l3Za4JHTW230WXjdWFSv8vWrVHs8kNS-tDkn2EKvvkg"
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)