1. 程式人生 > >curl pur delete post get請求類型參數

curl pur delete post get請求類型參數

request 參數 httpget get class code 如何 tty etop

curl如何發起DELETE/PUT請求

DELETE:

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, ‘DELETE‘);

PUT:

curl_setopt($ch, CURLOPT_PUT, true);

GET:

curl_setopt($ch, CURLOPT_HTTPGET, true);

POST:

curl_setopt($ch, CURLOPT_POST, true);

curl pur delete post get請求類型參數