Moving http requests to new file