If you close the lid with an external display connected, the system should not go to sleep automatically. In that case your downloads would continue. Otherwise, the default behavior when you close the lid is to put the system to sleep. Downloads cannot continue if the system is in sleep mode.