refactoring HTTPClient java classes