defines protocol for rest client to init different clients, name refactorings