Added switch http/https