yii2 Webhook post empty
<p>I am kinda new to the yii FrameWork, and i need help. </p>

<p>i need to implement a stripe webhook controller that is used for the subscription event sent by Stripe. 
For this controller, there is no view nor model</p>

<p>I can access to the controller, but the $_POST content is empty and i cannot figure why.</p>

<p>Is it possible to use the post verb without a view ? </p>

<p>here's an example : </p>

<pre><code>class StripeWebhookController extends Controller
{
     public function beforeAction($action)
    {
        if ($action-&gt;id == 'index') {
          $this-&gt;enableCsrfValidation = false;
         }

        return parent::beforeAction($action);
    }

public function actionIndex()
{   
  header('Content-Type: text/html; charset=utf-8');

    StripeLoader::autoload();
    \Stripe\Stripe::setApiKey( Settings::get("stripe_secret_key") );
       // retrieve the request's body and parse it as JSON
       $input = file_get_contents('php://input'); // -&gt; here $input is null

      $event_json = json_decode($input, true);

    //      Do the work...
}
</code></pre>

<p>i used the</p>

<pre><code> print_r(Yii::$app-&gt;request-&gt;post() /*$_POST*/); exit(); 
</code></pre>

<p>and i only got an empty array.</p>

<p>After days of search i found nothing... </p>

<p>If any one has an idea, i will gladly take it </p>

<p>Additionnal info : we are running on a IIS web server, using the Yii2 framework</p>

<p>Thanks for reading me
cya </p>