Helper class for making xhr requests