title: Unable to get POST working with Yii2 RESTful API
body: <p>I coded a RESTful API in Yii2-Basic using ActiveController and Basic Authentication. I can get the GET method to work, but when I try the Post, using Postman Chrome Extension, it throws an error saying "Method Not Allowed. This url can only handle the following request methods: GET, HEAD.".</p>
  
  <p>Do I need to configure anything on my web server to test this, or require additional functions in the controller? I even tried this with a really simple table with two columns and also set the columns as safe, as hinted in another question.</p>
  
  <p>Appreciate any help in this regard. Below is my current code:</p>
  
  <pre><code>&lt;?php
  namespace app\controllers;
  
  use yii\rest\ActiveController;
  use yii\filters\auth\HttpBasicAuth;
  
  class TestController extends ActiveController
  {
      public $modelClass = 'app\models\Test';
  
      public function behaviors()
      {
          $behaviors = parent::behaviors();
          $behaviors['authenticator'] = [
              'class' =&gt; HttpBasicAuth::className(),
          ];
          return $behaviors;
      }
  }
  </code></pre>
  
  <p>The URL I am using to test is: <a href="http://localhost/test" rel="nofollow noreferrer">http://localhost/test</a></p>