"134124", "Title" => "Example Plan", "WorkoutDay" => "2021-04-27T12:40:13-06:00", "TotalTimePlanned" => "1", "WorkoutType" => "run", "Structure" => "[ { \"IntensityClass\": \"WarmUp\", \"Name\": \"Warm up\", \"Length\": { \"Unit\": \"Second\", \"Value\": 600 }, \"Type\": \"Step\", \"IntensityTarget\": { \"Unit\": \"PercentOfThresholdHr\", \"Value\": 75, \"MinValue\": 70, \"MaxValue\": 80 } }, { \"IntensityClass\": \"Active\", \"Name\": \"Active\", \"Length\": { \"Unit\": \"Second\", \"Value\": 2095 }, \"Type\": \"Step\", \"IntensityTarget\": { \"Unit\": \"PercentOfThresholdHr\", \"Value\": 90, \"MinValue\": 80, \"MaxValue\": 100 } }, { \"Type\": \"Repetition\", \"Length\": { \"Unit\": \"Repetition\", \"Value\": 3 }, \"Steps\": [ { \"IntensityClass\": \"Active\", \"Name\": \"Hard\", \"Length\": { \"Unit\": \"Second\", \"Value\": 60 }, \"Type\": \"Step\", \"IntensityTarget\": { \"Unit\": \"PercentOfThresholdHr\", \"Value\": 115 }, \"CadenceTarget\": { \"Unit\": \"rpm\", \"MinValue\": 70, \"MaxValue\": 80 } }, { \"IntensityClass\": \"Rest\", \"Name\": \"Easy\", \"Length\": { \"Unit\": \"Second\", \"Value\": 60 }, \"Type\": \"Step\", \"IntensityTarget\": { \"Unit\": \"PercentOfThresholdHr\", \"Value\": 70 } } ] }, { \"IntensityClass\": \"CoolDown\", \"Name\": \"Cool Down\", \"Length\": { \"Unit\": \"Second\", \"Value\": 600 }, \"Type\": \"Step\", \"IntensityTarget\": { \"Unit\": \"PercentOfThresholdHr\", \"Value\": 75 }, \"OpenDuration\": true }]" )); ///// AQUƍ ENVIAR LOS DATOS DEL BODY $curl = curl_init(); -curl_setopt_array( $curl, array( CURLOPT_URL => $test_api_url, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => $header, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => $data ) // // ); /// aca debe ir algo que se parezca al body,, lago asi como CURLOPT_HTTPBODY $response = curl_exec($curl); switch ($http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE)) { case 200: echo "200"; break; default: echo 'Unexpected HTTP code: ', $http_code, "\n"; } echo '
'; echo json_encode($response); echo '
'; $info = curl_getinfo($curl); echo json_encode($info); echo "
" .$test_api_url; curl_close($curl); /* array( ) */