src/Curl/Curl.php
public function get($url, $data = array())
    {
        if (count($data) > 0) {
            $this->setOpt(CURLOPT_URL, $url.'?'.http_build_query($data));
        } else {
            $this->setOpt(CURLOPT_URL, $url);
        }
        $this->setOpt(CURLOPT_HTTPGET, true);
        $this->exec();
        return $this;
    }
public function get($url, $data = array())
    {
        if (count($data) > 0) {
            $this->setOpt(CURLOPT_URL, $url.'?'.http_build_query($data));
        } else {
            $this->setOpt(CURLOPT_URL, $url);
        }
        $this->setOpt(CURLOPT_HTTPGET, true);
        $this->exec();
        return $this;
    }
public function get ( $ url , $ data = array ( ) ) { if ( count ( $ data ) > 0 ) { $ this -> setOpt ( CURLOPT_URL , $ url . '?' . http_build_query ( $ data ) ) ; } else { $ this -> setOpt ( CURLOPT_URL , $ url ) ; } $ this -> setOpt ( CURLOPT_HTTPGET , true ) ; $ this -> exec ( ) ; return $ this ; }
Make a get request with optional data.

The get request has no body data, the data will be correctly added to the $url with the http_build_query() method.

@param string $url  The url to make the get request for
@param array  $data Optional arguments who are part of the url
@return self
Make a get request with optional data .