fixed endpoint typo, added https check