wp-includes/rest-api/class-wp-rest-request.php:29Core class used to implement a REST request object.
Every hook that fires from inside WP_REST_Request, in the order it appears in the class, grouped by the method that fires it.
$methodstringprotected$paramsarrayprotected$headersarrayprotected$bodystringprotected$routestringprotected$attributesarrayprotected$parsed_jsonboolprotected$parsed_bodyboolprotected#[AllowDynamicProperties]class WP_REST_Request implements ArrayAccess { /** * HTTP method. * * @since 4.4.0 * @var string */ protected $method = ''; /** * Parameters passed to the request. * * These typically come from the `$_GET`, `$_POST` and `$_FILES` * superglobals when being created from the global scope. * * @since 4.4.0 * @var array Contains GET, POST and FILES keys mapping to arrays of data. */ protected $params; /** * HTTP headers for the request. * * @since 4.4.0 * @var array Map of key to value. Key is always lowercase, as per HTTP specification. */ protected $headers = array(); /** * Body data. * * @since 4.4.0 * @var string Binary data from the request. */ protected $body = null; /** * Route matched for the request. * * @since 4.4.0 * @var string */ protected $route; /** * Attributes (options) for the route that was matched. * * This is the options array used when the route was registered, typically * containing the callback as well as the valid methods for the route. * * @since 4.4.0 * @var array Attributes for the request. */ protected $attributes = array(); /** * Used to determine if the JSON data has been parsed yet. * * Allows lazy-parsing of JSON data where possible. * * @since 4.4.0 * @var bool */ protected $parsed_json = false; /** * Used to determine if the body data has been parsed yet. * * @since 4.4.0 * @var bool */ protected $parsed_body = false; /** * Constructor. * * @since 4.4.0 *Introduced in 4.4.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
is_method() added.verified against sourcesrc/wp-includes/rest-api/class-wp-rest-request.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.