Beispiel #1
0
 /**
  * @inheritdoc
  */
 public function checkResponse(DomainInterface $domain)
 {
     $url = $domain->getPath() . drupal_get_path('module', 'domain') . '/tests/200.png';
     try {
         // GuzzleHttp no longer allows for bogus URL calls.
         $request = $this->httpClient->get($url);
     } catch (RequestException $e) {
         watchdog_exception('domain', $e);
         // File a general server failure.
         $domain->setResponse(500);
         return;
     }
     // Expected result (i.e. no exception thrown.)
     $domain->setResponse($request->getStatusCode());
 }