[router.controller.api] fixed content-type JSON header
This commit is contained in:
parent
720be931c0
commit
d0fbaa6f04
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue