Requests
- Source
wp-includes/class-requests.php:47
Requests for PHP
Description
Inspired by Requests for Python.
Based on concepts from SimplePie_File, RequestCore and WP_Http.
Compatibility
Deprecated in WordPress 6.2.0. Use <code>WpOrg\Requests\Requests</code> instead for the actual functionality and use <code>WpOrg\Requests\Autoload</code> for the autoloading.
- WordPress
- core
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Methods · 2
- autoloader()Deprecated autoloader for Requests.
- register_autoloader()Register the built-in autoloader
Source code
class Requests extends WpOrg\Requests\Requests { /** * Deprecated autoloader for Requests. * * @deprecated 6.2.0 Use the `WpOrg\Requests\Autoload::load()` method instead. * * @codeCoverageIgnore * * @param string $class Class name to load */ public static function autoloader($class) { if (class_exists('WpOrg\Requests\Autoload') === false) { require_once __DIR__ . '/Requests/src/Autoload.php'; } return WpOrg\Requests\Autoload::load($class); } /** * Register the built-in autoloader * * @deprecated 6.2.0 Include the `WpOrg\Requests\Autoload` class and * call `WpOrg\Requests\Autoload::register()` instead. * * @codeCoverageIgnore */ public static function register_autoloader() { require_once __DIR__ . '/Requests/src/Autoload.php'; WpOrg\Requests\Autoload::register(); }}Changelog
Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, from
src/wp-includes/class-requests.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.