I just came across the term 'Host Header' and I believe that I understand it fairly well. I was wondering how I could find out the host header through the requests library. I would think that it would be as simple as setting a requests.get(<some url>)
object as a variable called r
and printing r.headers['host']
but the response headers do not indicate the host. This would mainly come handy for me when sending a get request to an ip address and not a domain name. Is it safe to assume that the host header is just the ip of the server that I am targeting?
I've tried this on google.com and stackoverflow.com