Skip to content

Commit

Permalink
Update Action.php
Browse files Browse the repository at this point in the history
Content-Type: application/json response header
  • Loading branch information
perfectio authored Nov 8, 2017
1 parent 1dd2149 commit 04c7e4e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 04c7e4e

Please sign in to comment.