<?php 
header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Headers: X-API-KEY, Origin, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method");
header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE");
header("Allow: GET, POST, OPTIONS, PUT, DELETE");
$method = $_SERVER['REQUEST_METHOD'];
if($method == "OPTIONS") {
    die();
}

include_once dirname( __DIR__ ) . '/Model/db.php';
include_once dirname( __DIR__ ) . '/Model/Buscar.php';

$ejecutivos = new Buscar();
$data = $ejecutivos->getEjecutivos();

echo json_encode($data);
die();

?>