What is the easiest way to check whether the response received from a requests post was \"200 OK\" or an error has occurred?
I tried doing something like this:
In easy case:
import requests response = requests.get(url) if not response: #handle error here else: #handle normal response