I'm trying to do a cURL in PHP to an API that has a custom Content-Type response type option called "application/qhal+json". It returns a sort of JSON that's abstracted a bit for custom use.
What I'm using:
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CERTINFO, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: applcation/qhal+json'));
$result = curl_exec($ch);
However the response is always coming back as 'application/json' content type. Is it not possible to specify a custom content-type? Does anyone have any ideas on why the response isn't being returned in the correct format?