Ssl support

Use ssl if the scheme is https.