refact http reuest