Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt about idempotent

 
Fabian Angy
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !

In the exam, if there is a question which asks if GET is idempotent (without code or without any effect in the code), the answer will be true.

But if there is a question with a GET method that is not idempotent (which updates the database by example), the answer will be false except if we see "according to the HTTP spec", the answer will be true.

Is that correct ?

Angy.
 
Lalit Mehra
Ranch Hand
Posts: 384
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Fabian,

According to the java specs ... a GET method is always idempotent and if it is not used as one then there's a violation of the java specs.

you might like to go through this old post to get more info ... click here

cheers :-)
 
Fabian Angy
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perfect ! Thanks :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic