Requests · Method
response.raise_for_status
Response.raise_for_status() checks an HTTP response status. It raises HTTPError for an unsuccessful response and returns None when the status is successful.
Last updated
Syntax
Response.raise_for_status()In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
Response.status_coderequests.codesrequests.exceptions.HTTPErrorrequests.exceptions.RequestException