response code python code example
Example 1: python print return code of requests
>>> import requests
>>> r = requests.get('http://httpbin.org/status/404')
>>> r.status_code
404
Example 2: python response
# It is the response you get. It has many attributes.
import requests
response = request.get('https://abc.com')
print(response.[the response attribute])
# Some response attributes:
response.status_code
response.json()
response.text