public function __construct()
 {
     // CORS headers to allow certain methods
     header('Access-Control-Allow-Origin: *');
     header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');
     header('Content-type:application/json;charset=utf-8');
     parent::__construct();
 }
 public function __construct()
 {
     // CORS headers to allow certain methods
     header('Access-Control-Allow-Origin: *');
     header('Access-Control-Allow-Methods: POST');
     header('Content-type:application/json;charset=utf-8');
     header('X-Content-Type-Options: nosniff');
     parent::__construct();
 }