Http client refactor