move http tasks in separate file