protected function get($url)
    {
        $request = $this->http->get(
            $url,
            array('User-Agent' => self::USER_AGENT.' v.'.self::VERSION)
        );

        $response = $request->send();

        if (!$response->isSuccessful()) {
            $this->log('fail with '.$response->getStatusCode().' http code in url "'.$url.'" ');

            return;
        }
        $this->logger->log(LogLevel::INFO, 'retrieved url "'.$url.'" ');

        return $response->getBody();
    }
protected function get($url)
    {
        $request = $this->http->get(
            $url,
            array('User-Agent' => self::USER_AGENT.' v.'.self::VERSION)
        );

        $response = $request->send();

        if (!$response->isSuccessful()) {
            $this->log('fail with '.$response->getStatusCode().' http code in url "'.$url.'" ');

            return;
        }
        $this->logger->log(LogLevel::INFO, 'retrieved url "'.$url.'" ');

        return $response->getBody();
    }
protected function get ( $ url ) { $ request = $ this -> http -> get ( $ url , array ( 'User-Agent' => self :: USER_AGENT . ' v.' . self :: VERSION ) ) ; $ response = $ request -> send ( ) ; if ( ! $ response -> isSuccessful ( ) ) { $ this -> log ( 'fail with ' . $ response -> getStatusCode ( ) . ' http code in url "' . $ url . '" ' ) ; return ; } $ this -> logger -> log ( LogLevel :: INFO , 'retrieved url "' . $ url . '" ' ) ; return $ response -> getBody ( ) ; }
Retrieve content from a resource

@param $url

@return \Guzzle\Http\EntityBodyInterface|string
Retrieve content from a resource