title: Yii2 REST ful Api how to send status code
body: <p><a href="https://stackoverflow.com/questions/25701247/yii2-restful-api-example-to-add-a-new-action">Yii2 Restful API</a></p>
  
  <p>In the above link they mention for GET Search method , Please anyone tell me for like POST create and PUT Update ...</p>
  
  <p>In <code>main.config</code> under rules i created like,</p>
  
  <pre><code>['class' =&gt; 'yii\rest\UrlRule', 'controller' =&gt; 'v1/lkup-access-profile','extraPatterns' =&gt; ['POST create' =&gt; 'create']],
  </code></pre>
  
  <p>But its comes error as Method Not Allowed. This url can only handle the following request methods: POST. </p>