function UpdateFetcher::doRequest
Same name and namespace in other branches
- 11.x core/modules/update/src/UpdateFetcher.php \Drupal\update\UpdateFetcher::doRequest()
- 10 core/modules/update/src/UpdateFetcher.php \Drupal\update\UpdateFetcher::doRequest()
- 9 core/modules/update/src/UpdateFetcher.php \Drupal\update\UpdateFetcher::doRequest()
Applies a GET request.
Parameters
string $url: The URL.
array $options: The guzzle client options.
Return value
string The body of the request, or an empty string on failure.
1 call to UpdateFetcher::doRequest()
- UpdateFetcher::fetchProjectData in core/
modules/ update/ src/ UpdateFetcher.php
File
-
core/
modules/ update/ src/ UpdateFetcher.php, line 68
Class
- UpdateFetcher
- Fetches project information from remote locations.
Namespace
Drupal\updateCode
protected function doRequest(string $url, array $options) : string {
$data = '';
try {
$data = (string) $this->httpClient
->get($url, [
'headers' => [
'Accept' => 'text/xml',
],
])
->getBody();
} catch (ClientExceptionInterface $exception) {
Error::logException($this->logger, $exception);
}
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.