Hello everyone,
I try to build a php class in order to use workflows in Orchestrator.
I can use many requests, using this code :
$curl = curl_init();
$url = $this->url . 'catalog/System/Workflow/';
$curlOptions = array(
CURLOPT_URL => $url,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPAUTH => CURLAUTH_BASIC,
CURLOPT_SSLVERSION => 3,
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_USERPWD => "$this->username:$this->password",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => true
);
curl_setopt_array($curl, $curlOptions + $this->curlOptDefaults);
$content = curl_exec($curl);
if(curl_errno($curl) != 0)
{
echo "Error CURL : " . curl_error($curl);
die('');
}
$tabWorkFlows = json_decode($content, true);
But when I add this header
CURLOPT_HTTPHEADER => 'Content-Type: application/xml'
I always have the issue :
SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
even if I leave ssl_verifypeer et ssl verifyhost to 0. Have someone meet this problem ?
Feel free to ask more if needed.
Hi,
might be a problem that CURLOPT_HTTPHEADER expects an array.
Tim
Thanks, you saved my day !