Changed the index retrieval to use the apache http client instead of
java URLConnection