support HTTP and HTTPS