Api Put Gives 404

Hi,



I'm trying to change a product name with the API. When I set the custom request as PUT, the response is always 404. What am I doing wrong?



$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_url.'products/2');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($data_json)));
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS,$data_json);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, "$user_login:$api_key");
$response = curl_exec($ch);
curl_close($ch);




ProductID 2 exists and with a GET the reponse the reponse is ok.

Found the solution,



Open "/etc/httpd/conf/httpd.conf" and look for:

AllowOverride All
Options -MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes

Order allow,deny
Allow from all


Order deny,allow
Deny from all



[color=#333333][font=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif][size=3]Then just add PUT (and maybe DELETE if you want) after PROPFIND[/size][/font][/color]

What did you change? Assume you had to add 'PUT' to the allow clause.

[quote name='tbirnseth' timestamp='1437766626' post='224244']

What did you change? Assume you had to add 'PUT' to the allow clause.

[/quote]



Yes. added PUT and DELETE after PROPFIND.