有時由於我們需要給headers中間添加token或者其他請求同內容時,會自己重新組裝headers作為入參來調用requests.post()
如果入參data時JSON時一定要注意請求頭中不能省略 Content-Type
headers = {'Content-Type': 'application/json', 'token': token}
headers = {'Content-Type': 'application/json', 'token': token}
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。