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.


Top ↑

Parameters

$args

(array)Arguments used for the HTTP request.

$url

(string)The attempted URL.


Top ↑

Source

File: wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.9.0Introduced.

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.