How to call the following Curl API request using php ?
curl "https://api.example.com/v2/test" \
-X "POST" \
-H "App-Id: APP_ID" -H "App-Key: APP_KEY" \
-H "Content-Type: application/json" -d '{
"sex": "male",
"age": 30,
"evidence": [
{"id": "s_1193", "choice_id": "present"},
{"id": "s_488", "choice_id": "present"},
{"id": "s_418", "choice_id": "present"}
]
}'
I could only make it till:
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'app_id: '. APP_ID,
'app_key: '. APP_KEY
));
It is over my head being a newbie. Help requested from experts..