working RestCaller class for making ajax request