TwitterAPIExchange.php
public function request($url, $method = 'get', $data = null, $curlOptions = array())
    {
        if (strtolower($method) === 'get')
        {
            $this->setGetfield($data);
        }
        else
        {
            $this->setPostfields($data);
        }

        return $this->buildOauth($url, $method)->performRequest(true, $curlOptions);
    }
public function request($url, $method = 'get', $data = null, $curlOptions = array())
    {
        if (strtolower($method) === 'get')
        {
            $this->setGetfield($data);
        }
        else
        {
            $this->setPostfields($data);
        }

        return $this->buildOauth($url, $method)->performRequest(true, $curlOptions);
    }
public function request ( $ url , $ method = 'get' , $ data = null , $ curlOptions = array ( ) ) { if ( strtolower ( $ method ) === 'get' ) { $ this -> setGetfield ( $ data ) ; } else { $ this -> setPostfields ( $ data ) ; } return $ this -> buildOauth ( $ url , $ method ) -> performRequest ( true , $ curlOptions ) ; }
Helper method to perform our request

@param string $url
@param string $method
@param string $data
@param array  $curlOptions

@throws \Exception

@return string The json response from the server
Helper method to perform our request