Implement https support (not completed)