title: PUT or POST if the operation looks idempotent
body: <p>I want to create an application which is similar to this - A client (identified by user id) sends a REST API call to the server. The server queries database to check if this user has a badge before. If it has, it doesn't do anything. Otherwise, it marks in database that the user is granted the badge and it sends an email to the user.</p>
  
  <p>PUT /user//badge/
  POST /user//badge/</p>
  
  <p>My question here is which http method should I use here? PUT or POST? </p>
  
  <p>It is idempotent in the sense that email is sent in only the first request and subsequent requests don't do anything other than querying the db.</p>
  
  <p>What http method do books recommend to be used in this case?</p>