sync HttpClient with php-lite-solr

apply ameen's changes
and sync from https://github.com/muayyad-alsadi/php-lite-solr