WordPress at a glance
function is not described

wp_safe_remote_get() WP 3.6.0

Retrieve the raw response from a safe HTTP request using the GET method.

This function is ideal when the HTTP request is being made to an arbitrary URL. The URL is validated to avoid redirection and request forgery attacks.

  • See: wp_remote_request() For more information on the response array format.
  • See: WP_Http::request() For default arguments information.

No Hooks.

Return

WP_Error/Array. The response or WP_Error on failure.

Usage

wp_safe_remote_get( $url, $args );
$url(string) (required)
Site URL to retrieve.
$args(array)
Request arguments.
Default: empty array

Code of wp safe remote get: wp-includes/http.php WP 5.2.1

<?php
function wp_safe_remote_get( $url, $args = array() ) {
	$args['reject_unsafe_urls'] = true;
	$http                       = _wp_http_get_object();
	return $http->get( $url, $args );
}