Initial support for https.

I've added initial support for https. Thanks

   fintan