On this page
Requests_Exception::__construct( string $message, string $type, mixed $data = null, integer $code )
Create a new exception
Parameters
$messagestring Required-
Exception message
$typestring Required-
Exception type
$datamixed Optional-
Associated data
Default:
null $codeinteger Required-
Exception numerical code, if applicable
Source
File: wp-includes/Requests/Exception.php. View all references
public function __construct($message, $type, $data = null, $code = 0) {
parent::__construct($message, $code);
$this->type = $type;
$this->data = $data;
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Http::validate_redirects() wp-includes/class-wp-http.php | Validate redirected URLs. |
| Requests::set_defaults() wp-includes/class-requests.php | Set the default values |
| Requests::parse_response() wp-includes/class-requests.php | HTTP response parser |
| Requests::get_transport() wp-includes/class-requests.php | Get a working transport |
| Requests_Utility_CaseInsensitiveDictionary::offsetSet() wp-includes/Requests/Utility/CaseInsensitiveDictionary.php | Set the given item |
| Requests_Exception_HTTP::__construct() wp-includes/Requests/Exception/HTTP.php | Create a new exception |
| Requests_Response::throw_for_status() wp-includes/Requests/Response.php | Throws an exception if the request was not successful |
| Requests_IRI::parse_iri() wp-includes/Requests/IRI.php | Parse an IRI into scheme/authority/path/query/fragment segments |
| Requests_Proxy_HTTP::__construct() wp-includes/Requests/Proxy/HTTP.php | Constructor |
| Requests_Auth_Basic::__construct() wp-includes/Requests/Auth/Basic.php | Constructor |
| Requests_Cookie_Jar::offsetSet() wp-includes/Requests/Cookie/Jar.php | Set the given item |
| Requests_Transport_cURL::process_response() wp-includes/Requests/Transport/cURL.php | Process a response |
| Requests_Transport_fsockopen::verify_certificate_from_context() wp-includes/Requests/Transport/fsockopen.php | Verify the certificate against common name and subject alternative names |
| Requests_Transport_fsockopen::request() wp-includes/Requests/Transport/fsockopen.php | Perform a request |
| Requests_Response_Headers::offsetSet() wp-includes/Requests/Response/Headers.php | Set the given item |
| Requests_IDNAEncoder::utf8_to_codepoints() wp-includes/Requests/IDNAEncoder.php | Convert a UTF-8 string to a UCS-4 codepoint array |
| Requests_IDNAEncoder::punycode_encode() wp-includes/Requests/IDNAEncoder.php | RFC3492-compliant encoder |
| Requests_IDNAEncoder::digit_to_char() wp-includes/Requests/IDNAEncoder.php | Convert a digit to its respective character |
| Requests_IDNAEncoder::to_ascii() wp-includes/Requests/IDNAEncoder.php | Convert a UTF-8 string to an ASCII string using Punycode |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests_exception/__construct