(#946) add opts to gethost

Added the opts to get host. fixes 946