public function request($endpoint, $isPost = false, $params = array()){
		$accessToken = $this->getAccessToken();
		if($accessToken === null){
			return null;
		}
		$params['accessToken'] = $accessToken->getAccessToken();
		$url = $this->getConfig()->getApiUrl().$endpoint;
		if(!$isPost){
			$url .= '?'.http_build_query($params);
		}
		$ch = curl_init($url);
		if($isPost){
			curl_setopt($ch, CURLOPT_POST, true);
			curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
		}
		curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
		curl_setopt($ch, CURLOPT_TIMEOUT,10);
		curl_setopt($ch, CURLOPT_VERBOSE, true);
		$output = curl_exec($ch);

		$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
		curl_close($ch);
		
		return array('output' => $output, 'code' => $httpcode);
	}