You have uncommitted work pending. Please commit or rollback before calling out

So Stuck there with “You have uncommitted work pending. Please commit or rollback before calling out”  

na!! na!! don’t say the problem I know that!! Tell me the solution?

Not every problem has one solution, Let’s go thru those multiple solutions. You are the boss, select the solution that fits your use case

Solution #1:

Do DML operations with REST API after a Callout