Requests_Exception_HTTP_402 WordPress Class

The HTTP 402 error code is returned when a request is made to a resource that requires authentication but the request does not include the necessary credentials. This can happen when a user tries to access a restricted area of a website without logging in first. The Requests_Exception_HTTP_402 class is used to represent an HTTP 402 error in the Requests library. It extends the base Requests_Exception class, which provides a number of methods and properties for working with HTTP errors. To use this class, you should first catch any exceptions that might be thrown by the library: try { // make a request that might result in an HTTP 402 error } catch (Requests_Exception_HTTP_402 $e) { // handle the error }

Requests_Exception_HTTP_402 #

Exception for 402 Payment Required responses


Source

File: wp-includes/Requests/Exception/HTTP/402.php

class Requests_Exception_HTTP_402 extends Requests_Exception_HTTP {
	/**
	 * HTTP status code
	 *
	 * @var integer
	 */
	protected $code = 402;

	/**
	 * Reason phrase
	 *
	 * @var string
	 */
	protected $reason = 'Payment Required';
}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.