Microsoft IIS - PUT and DELETE API calls doesn't work

If you are using Microsoft IIS server, it's possible that by default it won't accept PUT and DELETE http requests. In that case, you have to allow it (verb parameter) in your web.config file.

web.config

<add name="php-5.6.30_1" path="*.php" verb="GET,HEAD,POST,PUT,DELETE" modules="FastCgiModule" scriptProcessor="C:\PHP_versioner\5.6N\php-cgi.exe" resourceType="Either" requireAccess="Script" />
<add name="php-5.6.30" path="*.php" verb="GET,HEAD,POST,PUT,DELETE" modules="FastCgiModule" scriptProcessor="C:\PHP\5.6.30-nts\php-cgi.exe" resourceType="Either" requireAccess="Script" />
<add name="php-7.1.2" path="*.php" verb="GET,HEAD,POST,PUT,DELETE" modules="FastCgiModule" scriptProcessor="C:\PHP\7.1.2-nts\php-cgi.exe" resourceType="Either" requireAccess="Script" />
×