Answer the question
In order to leave comments, you need to log in
Why empty Post in YII API action?
Good time everyone!
Through Axios, I post data to a custom action. Console.log() normally prints everything before sending.
But in the controller action Yii::$app->request->post() is empty.
Rule for the action is configured like this
[
'class' => 'yii\rest\UrlRule',
'pluralize' => false,
'controller' => 'savedata',
'extraPatterns' => [
'POST edit' => 'edit'
],
],
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question