public function sendJsonResponse(&$response_data, $headers = [])
    {
        header('Content-type: application/json');
        
        if (!empty($headers)) {
            if (is_array($headers)) {
                foreach ($headers as $header) {
                    header($header);
                }
            }
        }
        
        echo array_to_json($response_data);
    }