Added TSL support. Now both HTTP and HTTPS are available.