Exemple #1
0
 /**
  * Performs http GET request.
  * @param string $url
  * @throws \LogicException when no http client attached to provider.
  * @throws \Exception when any http client exception occuried.
  * @return string
  */
 protected function httpRequest($url)
 {
     if (!($http = $this->getHttpClient())) {
         throw new \LogicException('No http client defined.');
     }
     return $this->httpClient->get($url);
 }