Added [optional] HTTPS endpoint support.

This is primarily for browsers which don't like connecting to HTTP
endpoints when on a HTTP client, i.e. MSIE.