[Zope] Zope Requests - POST vs. GET
Passin, Tom
tpassin at mitretek.org
Thu Dec 18 13:54:10 EST 2003
[ Tino Wildenhain]
>
> This semantic you are referring to is effectively non
> existent. Sorry. If you see real world examples there are a
> lot of cases where the information indeed changes between GET
> requests.
I am not disputing that there are plenty of real-world cases where the
designer paid no attention to the intended semantics. I am saying that,
given a choice - and you have one if you are developing a system - it is
a good idea to follow the intention rather than to deliberately go
against it.
> See for example the shop, where you put items in a backet. On
> each page there is the number of items currently in the
> basket displayed. So no matter if you put it in via GET or
> POST at least another GET will give you different result. Its
> just not feaseable to do it any other way (e.g. only use POST
> for modifying data)
>
I do not see this at all (I mean, the "not feasible" part). You are
building the page, and whether you have your server stick the
information into a query string that is the value of a form's ACTION
attribute, or somewhere else in the form is up to you - you get to
choose how to do it. One way is as easy for the server as the other.
Anyway, a GET is of course allowed to give different results, just not
because of something that happened *because* of the GET. The GET is
supposed to reflect the current state of the thing, and if the state
were to change, so would the results of a GET, as Toby also mentioned.
None of these considerations need have anything to do with the html that
displays the contents of a shopping cart, or with a query string used
with a GET.
Cheers,
Tom P
More information about the Zope
mailing list