HTTPS support

Also, either the stuff here should be moved into `constructor:`, or the stuff in `constructor:` should be moved outside of the class.

Rule of thumb:

- Stuff belongs in `constructor:` if multiple instances of it can be created. Otherwise it should be "static" and outside of `constructor:`.