Get hosts method.