\yii\filters\ContentNegotiator::className(), 'formats' => [ 'application/json' => \yii\web\Response::FORMAT_JSON, ], ], // 'authenticator' => [ // 'class' => CompositeAuth::class, // 'authMethods' => [ // HttpBearerAuth::class, // ], // ] ]; } public function actionIndex() { return ['some' => 'rrr']; } // /** // * @inheritdoc // */ // protected function verbs() // { // return [ // 'index' => ['GET', 'HEAD'], // ]; // } }