getJson()); } function respondHtml(string $html) { setDefaultHeader(); print($html); } function respondStatus(int $statusCode, string $message = "") { setDefaultHeader(); http_response_code($statusCode); die($message); } function redirectBack() { header("Location: {$_SERVER['HTTP_REFERER']}"); } function redirectTo($url) { header("Location: {$url}"); } ?>