http client refactor fixes