Improve https support, use helpers method