RESTAdapter: Properly setup ajax request