I am trying to create a HTTP PUT request with cURL and I can\'t make it work. I\'ve read many tutorials but none of them actually worked. Here\'s my current code:
In a POST method, you can put an array. However, in a PUT method, you should use http_build_query to build the params like this:
http_build_query
curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query( $postArr ) );