protected function call()
    {
        $curl = curl_init();

        curl_setopt_array($curl, array(
            CURLOPT_RETURNTRANSFER      => 1,
            CURLOPT_URL                 => $this->requestUrl[$this->format].$this->param,
            CURLOPT_SSL_VERIFYPEER      => false,
            CURLOPT_FAILONERROR         => true,
        ));

        $request = curl_exec($curl);

        if (empty($request)) {
            throw new \RuntimeException('cURL request retuened following error: '.curl_error($curl) );
        }

        curl_close($curl);

        return $request;
    }
protected function call()
    {
        $curl = curl_init();

        curl_setopt_array($curl, array(
            CURLOPT_RETURNTRANSFER      => 1,
            CURLOPT_URL                 => $this->requestUrl[$this->format].$this->param,
            CURLOPT_SSL_VERIFYPEER      => false,
            CURLOPT_FAILONERROR         => true,
        ));

        $request = curl_exec($curl);

        if (empty($request)) {
            throw new \RuntimeException('cURL request retuened following error: '.curl_error($curl) );
        }

        curl_close($curl);

        return $request;
    }
protected function call ( ) { $ curl = curl_init ( ) ; curl_setopt_array ( $ curl , array ( CURLOPT_RETURNTRANSFER => 1 , CURLOPT_URL => $ this -> requestUrl [ $ this -> format ] . $ this -> param , CURLOPT_SSL_VERIFYPEER => false , CURLOPT_FAILONERROR => true , ) ) ; $ request = curl_exec ( $ curl ) ; if ( empty ( $ request ) ) { throw new \ RuntimeException ( 'cURL request retuened following error: ' . curl_error ( $ curl ) ) ; } curl_close ( $ curl ) ; return $ request ; }
Make cURL call
@return string
@throws \RuntimeException
Make cURL call