Add support for HTTPS WSDLs

I've refactored the get_url_file function to add support for HTTPS without introducing code duplication.