Added support for HTTPS.