added https support to basic client