How to make https post request in Cakephp
问题 I have requirement where app has to make REST API calls over HTTPS POST. I am new to cakephp. I was thinking if I could do https calls using httpsocket. I appreciate any help. Thanks. 回答1: If you have PHP's Curl module enabled: <?php // create a new cURL resource $ch = curl_init(); $data = array('Your' => 'Data'); // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, "http://www.example.com/"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http