$this->withHttpFallback =
$settings->
get('update_fetch_with_http_fallback', FALSE
);
if ($this->logger === NULL
) { @
trigger_error('Calling ' . __METHOD__ . '() without the $logger argument is deprecated in drupal:10.1.0 and it will be required in drupal:11.0.0. See https://www.drupal.org/node/2932520', E_USER_DEPRECATED
);
$this->logger = \Drupal::
service('logger.channel.update'
);
} } /**
* {@inheritdoc}
*/
public function fetchProjectData(array
$project,
$site_key = ''
) { $url =
$this->
buildFetchUrl($project,
$site_key);
return $this->
doRequest($url,
['headers' =>
['Accept' => 'text/xml'
]],
$this->withHttpFallback
);
} /**
* Applies a GET request with a possible HTTP fallback.
*
* This method falls back to HTTP in case there was some certificate
* problem.
*
* @param string $url
* The URL.
* @param array $options
* The guzzle client options.
* @param bool $with_http_fallback
* Should the function fall back to HTTP.
*
* @return string
* The body of the HTTP(S) request, or an empty string on failure.
*/