Added option for ssl or normal http