我在邮递员中拥有Api,但我无法更改curl php。也许有人可以帮助我
我需要像这样使用curl代码,但是我不知道如何使用curl转换主体(值数组和文件)
curl_setopt($ch, CURLOPT_URL,"https://localhost/api/v1/clients/mobile/user");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, **body data**);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:multipart/form-data'));
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,0);
// receive server response ...
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec ($ch);
curl_close ($ch);