I would just make this:
req.open('get', ('/data/alertsbyrev?rev='+rev), true);