WordPress at a glance
function is not described

WP_Http::validate_redirects() public WP 4.7.5

Validate redirected URLs.

{} It's a method of the class: WP_Http{}

No Hooks.

Return

null. Null. Nothing.

Usage

$result = WP_Http::validate_redirects( $location );
$location(string) (required)
URL to redirect to.

Changelog

Since 4.7.5 Introduced.

Code of WP_Http::validate_redirects() WP 5.7.1

<?php
public static function validate_redirects( $location ) {
	if ( ! wp_http_validate_url( $location ) ) {
		throw new Requests_Exception( __( 'A valid URL was not provided.' ), 'wp_http.redirect_failed_validation' );
	}
}