title: Slim Framework Method not allowed. Must be one of: POST (405)
body: <p>I have written REST api in slim framework. When i call authenticate API from browser it troughs <strong>'Method not allowed. Must be one of: POST'</strong>. Below is my code, please correct me where i went wrong.</p>
  
  <p><strong>Index.php</strong></p>
  
  <pre><code>&lt;?php
  
  require 'vendor/autoload.php';
  require 'Authenticate.php';
  
  $app = new \Slim\App;
  
  $app-&gt;post('/api/authenticate', \Authenticate::class);
  
  $app-&gt;run();
  </code></pre>
  
  <p><strong>.htaccess</strong></p>
  
  <pre><code>RewriteEngine On
  RewriteRule ^ index.php [QSA,L]
  </code></pre>
  
  <p><strong>URL</strong></p>
  
  <pre><code>http://localhost/project/api/authenticate
  </code></pre>