protected function sendPostRequest($path, $params){
		$url = $this->getConfig()->getAuthUrl().$path;
		$ch = curl_init($url);
		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);
	}
protected function sendPostRequest($path, $params){
		$url = $this->getConfig()->getAuthUrl().$path;
		$ch = curl_init($url);
		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);
	}
protected function sendPostRequest ( $ path , $ params ) { $ url = $ this -> getConfig ( ) -> getAuthUrl ( ) . $ path ; $ ch = curl_init ( $ url ) ; 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 ) ; }
Sends a POST request to the auth server. Returns array with keys 'output' and 'code'. Output contains the response body, code contains the response code.
@param string $path The endpoint that you want to access
@param string $params The parameters you want to send
@return array
Sends a POST request to the auth server . Returns array with keys output and code . Output contains the response body code contains the response code .