The requests library (which is currently the gold standard for handling HTTP in Python) manages to provide both interfaces (exceptions or member variable inspection) successfully:
http://docs.python-requests.org/en/latest/user/quickstart/#response-status-codes
The requests library (which is currently the gold standard for handling HTTP in Python) manages to provide both interfaces (exceptions or member variable inspection) successfully:
http:// docs.python- requests. org/en/ latest/ user/quickstart /#response- status- codes