updating to latest version of httpclients
making code compatible to latest version of httpclients