The Slim Framework support forum has moved to http://discourse.slimframework.com. This Tender forum is no longer maintained or monitored.

PUT request giving error "405 Method Not Allowed"

kamran_bhatti58's Avatar

kamran_bhatti58

17 May, 2016 12:19 PM

I am building a rest webservice using SLIM which is working fine with GET and POST method but when i tried to Request a PUT method. It is giving me error "405 Method Not Allowed". i don't know what is the problem.
Here is my code:
       $app->put('/user/:id', function($user_id) use ($app)
       {
                echo 'done';
       });

Here is my .htaccess:
         RewriteCond %{REQUEST_FILENAME} !-d
         RewriteCond %{REQUEST_FILENAME} !-f
         RewriteRule ^(.*)$ index.php [QSA,L]
Need help!

  1. Josh Lockhart closed this discussion on 12 Feb, 2021 07:37 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac