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


Full Text Titles Only Newest First

Sponsored By: