refactoring httptask and sending time