• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/UpdateSystem/Request.php
  • Класс: BitrixMainUpdateSystemRequest
  • Вызов: Request::send
public function send(): string
{
	$this->url->addParams($this->body);
	$isSuccess = $this->httpClient->query(
		$this->method,
		$this->url->getLocator(),
		$this->body
	);

	if ($isSuccess)
	{
		return $this->httpClient->getResult();
	}
	else
	{
		if ($this->httpClient->getStatus() === 0 && empty($this->httpClient->getError()))
		{
			throw new Exception('Invalid response from host: '.$this->url->getHost().' [RS01]', 400);
		}
		else
		{
			throw new SystemException(implode('rn', $this->httpClient->getError()).' [RS02]');
		}
	}
}