rest_url_details_http_request_args WordPress Filter Hook
The "rest_url_details_http_request_args" filter hook allows you to modify the arguments that are used when making an HTTP request to the WordPress REST API. This can be useful for adding authentication headers, or for changing the request method from GET to POST.
apply_filters( 'rest_url_details_http_request_args', array $args , string $url ) #
Filters the HTTP request args for URL data retrieval.
Description
Can be used to adjust response size limit and other WP_Http::request() args.
Parameters
- $args
(array)Arguments used for the HTTP request.
- $url
(string)The attempted URL.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php
Changelog
Version | Description |
---|---|
5.9.0 | Introduced. |