Django RestFrameWork + JWT验证报错http: error: InvalidHeader: Invalid return character or leading space

Django RestFrameWork + JWT验证报错http: error: InvalidHeader: Invalid return character or leading space,第1张

在写个人博客,尝试使用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" 

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/714554.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-24
下一篇 2022-04-24

发表评论

登录后才能评论

评论列表(0条)

保存