json_decode(file_get_contents("php://input"));
$url = 'https://site.com';
$ch = curl_init($url);
$jsonData = array(
//...
);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
$result = curl_exec($ch);
$data = file_get_contents("php://input");
$requestBody = json_decode($data, true);