Requests_Respons8b7c:f320:99b9:690f:4595:cd17:293a:c069throw_for_status( boolean $allow_redirects = true )  Throws an exception if the request was not successful   Parameters   $allow_redirects boolean Optional    Set to false to throw on a 3xx as well  Default: true     Source  File: wp-includes/Requests/Response.php. View all references  public function throw_for_status($allow_redirects = true) {
	if ($this->is_redirect()) {
		if (!$allow_redirects) {
			throw new Requests_Exception('Redirection not allowed', 'response.no_redirects', $this);
		}
	}
	elseif (!$this->success) {
		$exception = Requests_Exception_HTTP8b7c:f320:99b9:690f:4595:cd17:293a:c069get_class($this->status_code);
		throw new $exception(null, $this);
	}
}
   Related  Uses    Uses Description      Requests_Exception_HTTP8b7c:f320:99b9:690f:4595:cd17:293a:c069get_class() wp-includes/Requests/Exception/HTTP.php   Get the correct exception class for a given error code     Requests_Respons8b7c:f320:99b9:690f:4595:cd17:293a:c069is_redirect() wp-includes/Requests/Response.php   Is the response a redirect?     Requests_Exception8b7c:f320:99b9:690f:4595:cd17:293a:c069__construct() wp-includes/Requests/Exception.php   Create a new exception   
  

    
{'path': 'public/docs/wordpress/classes/requests_response/throw_for_status.html', 'source': 'DevDocs.IO'}