Added https support to a core function