(#1602) - Make getHost pluggable in http.js