title: In REST is POST or PUT best suited for upsert operation?
body: <p>I keep a key-value storage in the server for the client. If the user sends key "k1", then I upsert it to the database. Is this considered <code>POST</code> or <code>PUT</code>?</p>
  
  <p>Also I have another operation that removes all existing keys and adds the new key. Is this <code>POST</code> or <code>PUT</code> because it clears records and adds a new one.</p>