Sign In/My Account | View Cart  
advertisement

Article:
 Show Me the Code
Subject: Why PUT vs. POST?
Date: 2005-03-04 22:23:28
From: Mike Dierken
Response to: Why PUT vs. POST?

A PUT request is idempotent - it can be repeated and the client can be sure of the results. A POST has no such guarantee - it could append some text, and doing that twice results in something different than doing it once.


The benefit of repeatable requests is that if the network goes down, or a reply doesn't reach the client, your software can simply send the request again - the system as a whole becomes tolerant of failures.


In the example, the collection could be replace with a PUT, but that's a design choice of the developer.


No Previous Message Previous Message Move up to Parent Message Up Next Message No Next Message


Titles Only Titles Only Newest First
  • Why PUT vs. POST?
    2005-03-05 07:34:05 velebak [Reply]

    That makes sense, I guess it's all in how your application code handles PUT and POST operations. I was thinking too far down in the code again. Thanks for the clarification!


    Keith


Sponsored By: