[router.controller.api] fixed content-type JSON header

This commit is contained in:
xdrm-brackets 2018-03-01 17:55:13 +01:00
parent 720be931c0
commit d0fbaa6f04
1 changed files with 2 additions and 1 deletions

View File

@ -33,12 +33,13 @@
*/ */
public function call(){ public function call(){
header('Content-Type: application/json');
/* (1) Process response */ /* (1) Process response */
$this->response = $this->request->dispatch(); $this->response = $this->request->dispatch();
/* (2) Manages result */ /* (2) Manages result */
if( $this->response instanceof Response ){ if( $this->response instanceof Response ){
header('Content-Type: application/json');
echo $this->response->serialize(); echo $this->response->serialize();
} }