HTTP(S) url building function is working