Abstract how we create ajax requests