Move http logic to http location