March 2019
Beginner
490 pages
12h 40m
English
The response.headers statement provides the headers of the web server response. Basically, the response is an object dictionary, and with the items() method, we can iterate with the key-value format for access to the header's response.
You can find the following code in the get_headers.py file:
#!/usr/bin/env python3import requestsresponse = requests.get('http://github.com')try: for key,value in response.headers.items(): print('%s: %s' % (key, value))except Exception as error: print('%s' % (error))
In this screenshot, we can see the script execution for the github.com domain:

We can also find browser add-ons or plugins ...
Read now
Unlock full access