Need an isRest function. rest is used for basic authen web services, ajax for client based, both should have the same content returned.