Infosys interview question

Rest Api integration- How to create Rest api class