original_string: public static function post($url, $payload, $contentType = 'Content-Type: application/json') {
  		// TODO move constants to global configuration file
  		$ch = curl_init ( $url );
  		curl_setopt ( $ch, CURLOPT_CUSTOMREQUEST, "POST" );
  		curl_setopt ( $ch, CURLOPT_POSTFIELDS, $payload );
  		curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, true );
  		curl_setopt ( $ch, CURLOPT_HTTPHEADER, array (
  				$contentType,
  				'Content-Length: ' . strlen ( $payload ) 
  		) );
  		$result = curl_exec ( $ch );
  		return $result;
  	}
code: public static function post($url, $payload, $contentType = 'Content-Type: application/json') {
  		// TODO move constants to global configuration file
  		$ch = curl_init ( $url );
  		curl_setopt ( $ch, CURLOPT_CUSTOMREQUEST, "POST" );
  		curl_setopt ( $ch, CURLOPT_POSTFIELDS, $payload );
  		curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, true );
  		curl_setopt ( $ch, CURLOPT_HTTPHEADER, array (
  				$contentType,
  				'Content-Length: ' . strlen ( $payload ) 
  		) );
  		$result = curl_exec ( $ch );
  		return $result;
  	}
code_tokens: public static function post ( $ url , $ payload , $ contentType = 'Content-Type: application/json' ) { // TODO move constants to global configuration file $ ch = curl_init ( $ url ) ; curl_setopt ( $ ch , CURLOPT_CUSTOMREQUEST , "POST" ) ; curl_setopt ( $ ch , CURLOPT_POSTFIELDS , $ payload ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , true ) ; curl_setopt ( $ ch , CURLOPT_HTTPHEADER , array ( $ contentType , 'Content-Length: ' . strlen ( $ payload ) ) ) ; $ result = curl_exec ( $ ch ) ; return $ result ; }
docstring: Function to post a payload to a url using cURL.
  
  @param string $url
  @param string $payload
  @param string $contentType
  @return mixed the result of the curl execution.
docstring_tokens: Function to post a payload to a url using cURL .