Pass Authenticity token through http header

怎甘沉沦 提交于 2019-12-04 12:50:42

to set custom headers you use response.headers.

Something like

response.headers["X-AUTH-TOKEN"] = auth_token

should work.. to read the header you use

request.headers["X-AUTH-TOKEN"]

the X- in the naming is a good practice convention, all custom headers should have an X- in front.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!