diff --git a/build/router/controller/api.php b/build/router/controller/api.php index 288c625..a6b0987 100644 --- a/build/router/controller/api.php +++ b/build/router/controller/api.php @@ -33,12 +33,13 @@ */ public function call(){ + header('Content-Type: application/json'); + /* (1) Process response */ $this->response = $this->request->dispatch(); /* (2) Manages result */ if( $this->response instanceof Response ){ - header('Content-Type: application/json'); echo $this->response->serialize(); }