isset($info['Params']) ? $data['Params'] = $info['Params'] : null;
    //giving a 200 status code when the call is for an image
    if ($data['imgException']) {
        http_response_code(200);
    } else {
        http_response_code(400);
    }
    header("Content-Type: application/json");
    echo json_encode($data);
}
set_exception_handler('generalExceptionHandler');
if (isset($_POST['method'])) {
    switch ($_POST['method']) {
        case "user_INS":
            $validate = new validate();
            $data = $validate->user();
            $function = new functions();
            $data = $function->user_INS($mysqli);
            break;
        case "login_SEL":
            $validate = new validate();
            $data = $validate->login();
            $function = new functions();
            $data = $function->login_SEL($mysqli);
            break;
        case "service_SEL":
            $validate = new validate();
            $data = $validate->services_sel();
            $function = new functions();
            $data = $function->service_SEL($mysqli);
            break;