curl pur delete post get请求类型参数

Posted 小小小尘埃

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了curl pur 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);

以上是关于curl pur delete post get请求类型参数的主要内容,如果未能解决你的问题,请参考以下文章