| Author |
a question about HTTP method
|
dx wu
Ranch Hand
Joined: Apr 28, 2002
Posts: 60
|
|
Which HTTP method has the characteristic that multiple identical requests may produce side effect beyond those of a single request? A.PUT B.GET C.INFO D.POST E.HEAD F.TRACE thanks for someone help me!
|
good good study , day day up!
|
 |
Kejal Shah
Ranch Hand
Joined: Jun 27, 2003
Posts: 87
|
|
|
is the answer B?
|
Kejal<br />SaneDevil@gmail.com
|
 |
Debashish Chakrabarty
Ranch Hand
Joined: May 14, 2002
Posts: 225
|
|
(Answers: A,C,D & F) Only GET and HEAD are considered idempotent, all others when invoked with multiple identical requests may produce side effect.
|
Debashish
SCJP2, SCWCD 1.4
|
 |
Kejal Shah
Ranch Hand
Joined: Jun 27, 2003
Posts: 87
|
|
Hi Debashish et al. It was a typo from my side. I meant the ans as D. Post. I just checked the HTTP 1.1 spec (http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html) and found the ff. quote " Methods can also have the property of "idempotence" in that (aside from error or expiration issues) the side-effects of N > 0 identical requests is the same as for a single request. The methods GET, HEAD, PUT and DELETE share this property. Also, the methods OPTIONS and TRACE SHOULD NOT have side effects, and so are inherently idempotent." tat leaves us with the ans of POST. HTH
|
 |
Debashish Chakrabarty
Ranch Hand
Joined: May 14, 2002
Posts: 225
|
|
|
Oh Ya TRACE should not be in the answers. Apologies!
|
 |
Sar Lolla
Greenhorn
Joined: Mar 10, 2005
Posts: 10
|
|
There is no INFO method in HTTP. Only PUT and POST can have side effects and nothing else. HTTP methods
|
 |
Kumar J
Ranch Hand
Joined: Feb 13, 2005
Posts: 35
|
|
hi, According to Http 1.1...PUT too is idempotent... Refer to page 114 HFSJ...and the previous answer given by kejal... bye Kumar V
|
With Regards,<br />Kumar J
|
 |
Debashish Chakrabarty
Ranch Hand
Joined: May 14, 2002
Posts: 225
|
|
Guys! Let me summarise it here for benefit of all. The question asks about non-idempotent methods (i.e. methods that may produce side effect when invoked with multiple identical requests). GET, HEAD, PUT and TRACE are considered idempotent. The name INFO has been given just to confuse I suppose :roll: , there is not such method. Which leaves us with answer for the question: D. POST. POST is not idempotent.
|
 |
 |
|
|
subject: a question about HTTP method
|
|
|