Using PUT method with PHP cUrl Library

后端 未结 3 2012
温柔的废话
温柔的废话 2020-12-13 04:25

I\'m able to run the following curl command (at the command line) successfully:

curl -XPOST --basic -u user:password -H accept:application/json -H Content-ty         


        
3条回答
  •  轮回少年
    2020-12-13 05:17

    All all that needs to be set is the custom request to reuse post method.

    CURLOPT_URL=>$url,
    CURLOPT_CUSTOMREQUEST=>'PUT',
    CURLOPT_POSTFIELDS=>$params,
    

提交回复
热议问题