File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
Author

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.

Regards,
Ravi.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
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: http://www.slideshare.net/krizsan
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9378
    
    2

Look here at the first point http://faq.javaranch.com/view?ScwcdHints


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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: PUT is not idempotent or not