diff --git a/Action.php b/Action.php index 070e40b..21ed1f3 100644 --- a/Action.php +++ b/Action.php @@ -28,6 +28,9 @@ public function run() $this->exception = new Exception($e->getMessage(), Exception::INTERNAL_ERROR); } Yii::endProfile('service.request'); + + Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; + return $this->toJson(); }