Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

response 404 requests python compare

Look at the r.status_code attribute:

if r.status_code == 404:
    # A 404 was issued.

e.g.:

>>> import requests
>>> r = requests.get('http://httpbin.org/status/404')
>>> r.status_code
404
Source by www.google.com #
 
PREVIOUS NEXT
Tagged: #response #requests #python #compare
ADD COMMENT
Topic
Name
5+9 =