Making a PUT request with PHP and CURL

后端 未结 1 825
孤城傲影
孤城傲影 2021-01-06 07:55

First of all I\'m working based on the following assumption: according to the REST architecture you can use PUT to create a new resource, in my case a file with additional i

1条回答
  •  南笙
    南笙 (楼主)
    2021-01-06 08:43

    CURLOPT_CUSTOMREQUEST is useful when you want / need to do some kind of special request that is not common enough to be supported by itself, via its own option.

    CURLOPT_POST, CURLOPT_PUT, and CURLOPT_GET allow you to send POST / PUT / GET requests -- which are some types of requests that are common enough to have their own options ; which means they don't need you to use CURLOPT_CUSTOMREQUEST.

    0 讨论(0)
提交回复
热议问题