minor http client refactoring, updating test for ES 0.90.x