protected function HttpFetcherFeedForm::get in Feeds 8.3
Performs a GET request.
Parameters
string $url: The URL to GET.
Return value
\Guzzle\Http\Message\Response A Guzzle response.
Throws
\RuntimeException Thrown if the GET request failed.
File
- src/
Feeds/ Fetcher/ Form/ HttpFetcherFeedForm.php, line 116
Class
- HttpFetcherFeedForm
- Provides a form on the feed edit page for the HttpFetcher.
Namespace
Drupal\feeds\Feeds\Fetcher\FormCode
protected function get($url) {
try {
$response = $this->client
->get(Feed::translateSchemes($url));
} catch (RequestException $e) {
$args = [
'%site' => $url,
'%error' => $e
->getMessage(),
];
throw new \RuntimeException($this
->t('The feed from %site seems to be broken because of error "%error".', $args));
}
return $response;
}