refactor http/ws client with connector