• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is Put Idempotent or Not?

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is Put Idempotent or Not
In the Kathy's book, they have mentioned that get,head and put are idempotent

I got this from API for doPut: This method does not need to be either safe or idempotent
 
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Only POST method is considered as non-idempotent. Practically you can implement any method as non-idempotent in your servlet.

Thanks
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As I understand it, the HTTP Spec regards GET as idempotent although it is possible to write a doGet(..) method which is not. However a GET should not really change anything on the server; as it's name suggests, it should only really retrieve information. Conversely POST is not idempotent since the data it contains may be used for an irreversible transaction. Hence it's not considered Idempotent.

Hope that helps.

regards

Mo SCJP 1.4, SCWCD (in Progress)
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic