curl put delete post get请求类型参数

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);
posted @ 2017-08-16 11:43  小小小尘埃  阅读(1257)  评论(0)    收藏  举报