handle($_GET['id'] ?? null, file_get_contents('php://input') ?: ''); http_response_code($result['status']); header('Content-Type: application/json; charset=utf-8'); echo json_encode($result['body'], JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_SUBSTITUTE);