My code to add header is:
$apikey="xyz";
curl_setopt($handle, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Accept: application/json',
'X-Auth-Token: $apikey'
));
But I am getting an error showing that **This request requires HTTP Authentication.**Now I want to know whether I am right? If Yes why I am getting error.If I am wrong how can do this..
Thankyou,