Changing Request class to Xhr