Hello guys!
I am using the latest development version of Hyper. I have been trying for hours to be able to print out cookies from using Hyper adapt. I have created a code which looks like:
s = requests.session()
s.mount('https://', HTTP20Adapter()) #As soon as I comment this row (Meaning that this code will not be in use then it works with getting cookies) however as soon as you use this function then you will not receive any cookies
s.headers = OrderedDict()
url = 'https://github.com/'
headers = {
'upgrade-insecure-requests': '1',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36',
'accept': "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3",
'accept-language': 'sv-SE,sv;q=0.9,en-US;q=0.8,en;q=0.7,de;q=0.6'
}
r = s.get(url, headers=headers, timeout=5, verify=False)
print(r.cookies)
Which gives me a output of:
<RequestsCookieJar[]>
However if I change
r = s.get(url, to r = requests.get(url, then I do get output of
<RequestsCookieJar[<Cookie _octo=GH1.1.1584727450.1556359694 for .github.com/>, <Cookie logged_in=no for .github.com/>, , ]>
So the question is, why does it happen like this?
Hello guys!
I am using the latest development version of Hyper. I have been trying for hours to be able to print out cookies from using Hyper adapt. I have created a code which looks like:
Which gives me a output of:
<RequestsCookieJar[]>
However if I change
r = s.get(url, to r = requests.get(url, then I do get output of
<RequestsCookieJar[<Cookie _octo=GH1.1.1584727450.1556359694 for .github.com/>, <Cookie logged_in=no for .github.com/>, , ]>
So the question is, why does it happen like this?