Support HTTPS using connect method.