refactor rest_adapter to make _remoteCall a common path for all operations