Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes PUT is not idempotent or not Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "PUT is not idempotent or not" Watch "PUT is not idempotent or not" New topic

PUT is not idempotent or not

PRavi kumar
Ranch Hand

Joined: May 13, 2007
Posts: 69
Hi Ranchers,

The HTTP PUT is idempotent or not.

"PUT method is used to store some thing in server. if it's already exist it will repalce the content."

in above statement it changeing the content in server.

please clarify me.

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
As per definition, a function f is idempotent if f(f(x)) = f(x).
That is, applying the function n times has the same effect as applying the function once.
When uploading a file to a server, it does not matter if I upload it once or five times - the contents on the server will be the same, thus PUT is idempotent.

My free books and tutorials:
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9763

Look here at the first point

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
subject: PUT is not idempotent or not