I am working on API in which i need to make a post call to a url.
body is
{
"image":"http://media.kairos.com/kairos-elizabeth.jpg",
"subject_id":"subtest1",
"gallery_name":"gallerytest1",
"selector":"SETPOSE",
"symmetricFill":"true"
}
header is
'Content-Type:application/json',
'app_id:app_id',
'app_key:app_key'
i am using curl.code is below
<?php
$ch = curl_init('some url');
$content= array(
'image'=>'some_image.jpg',
'subject_id'=>'subtest1',
'gallery_name'=>'gallerytest1',
'selector'=>'SETPOSE',
'symmetricFill'=>'true'
);
curl_setopt_array($ch, array(
CURLOPT_POST => TRUE,
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_HTTPHEADER => array(
'Content-Type:application/json',
'app_id:id',
'app_key:key'
),
CURLOPT_POSTFIELDS => json_encode($content)
));
$response = curl_exec($ch);
if($response === FALSE){
die(curl_error($ch));
}
$responseData = json_decode($response, TRUE);
?>
When i run the script blank page appears.Help me find the issue.