import requests
cookie = dict(JSESSIONID="C0814388AAC36FBCA25639BED4F007F5")
print(cookie)
r = requests.get("http://baison.yunz.com.cn/shopping-mall/rest/orders/list.html?size=1", cookies=cookie)
print(r.text)
#Another method
headers = {
"cookie": "JSESSIONID=C0814388AAC36FBCA25639BED4F007F5",
}
r = requests.get("http://baison.yunz.com.cn/shopping-mall/rest/orders/list.html?size=1", headers=headers)
print(r.text)
既然cookie是在请求头里面发送的,我们当然也可以在request header 里面说明