title: Meaning of idempotency in the context of HTTP PUT?
body: <p>In <a href="https://www.youtube.com/watch?feature=player_embedded&amp;v=mZ8_QgJ5mbs#t=1020" rel="nofollow">this presentation on REST</a> (timestamp 17:00-18:45), the speaker says that an HTTP <code>PUT</code> must include all the properties for a resource, and not be used for partial updates. This is required in HTTP because otherwise it is not idempotent.</p>
  
  <p>His definition of idempotency is (and this sounds reasonable):</p>
  
  <blockquote>
    <p>idempotent is any operation that can be performed once or multiple
    times and result in the same server state</p>
  </blockquote>
  
  <p>However, he then goes on to give an example where (paraphrased):</p>
  
  <blockquote>
    <p>Request A: I use a <code>PUT</code> to update only the name property of a resource.</p>
    
    <p>Request B: I use a <code>PUT</code> to update only the description. </p>
    
    <p>In between A and B another client could specify the name, then after request B, the
    resource has the other client's name, and my description. Because the
    server state isn't the same after request A and B, that's not an
    idempotent operation.</p>
  </blockquote>
  
  <p>I'm not sure about this interpretation: for me, idempotency only tells you something about what happens when you run the <em>same</em> operation multiple times in a row. In the above example, request A and B are two different operations, so there is no reason to think that running A then B should be have any special guarantees; in particular, there is no reason to think they should together constitute an atomic operation. </p>
  
  <p>Running request A multiple times would have the same effect as running it once (likewise for B), so I would have thought it idempotent (even if this was an incorrect use of <code>PUT</code> for other reasons).</p>
  
  <p>Is my understanding incorrect? </p>
  
  <p>(Note: this is intended to be a question about the meaning of idempotency, not the appropriate use of <code>PUT</code>).</p>