function public static function Bootstrap::checkUrlIsReachable

8.x-3.x Bootstrap.php public static Bootstrap::checkUrlIsReachable($url, array $options = [], &$exception = NULL)

Checks whether a specific URL is reachable.

Parameters

string $url: The URL to check.

array $options: Additional options to pass to the HTTP client.

\Exception|null $exception: Any Exceptions throw, passed by reference.

Return value

\Drupal\bootstrap\SerializedResponse A SerializedResponse object.

Class

Bootstrap
The primary class for the Drupal Bootstrap base theme.

Namespace

Drupal\bootstrap

Source src/Bootstrap.php (line 373)

public static function checkUrlIsReachable($url, array $options = [], &$exception = NULL) {
  $options['method'] = 'HEAD';
  $options['ttl'] = 0;
  return static::request($url, $options, $exception);
}