ScriptRequest was definitely the wrong place for the logic and I guess that no one is going to win an OO design prize when using the Java URL API...