python
pip install requests
python
import requests
python
response = requests.get(url)
python
response = requests.post(url, data=data)
python
status_code = response.status_code
python
content = response.content
python
headers = response.headers
python
try:
response = requests.get(url)
except requests.exceptions.HTTPError as errh:
except requests.exceptions.ConnectionError as errc:
except requests.exceptions.Timeout as errt:
except requests.exceptions.RequestException as err: