Does php mvc framework agavi use CRUD compliant to REST?
Posted
by txwikinger
on Stack Overflow
See other posts from Stack Overflow
or by txwikinger
Published on 2009-08-22T01:24:48Z
Indexed on
2010/05/31
2:02 UTC
Read the original article
Hit count: 274
The agavi framework uses the PUT request for create and POST for updating information. Usually in REST this is used the other way around (often referring to POST adding information while PUT replacing the whole data record).
If I understand it correctly, the important issue is that PUT must be idempotent, while POST does not have this requirement. Therefore, I wounder how creating a new record can be idempotent (i.e. multiple request do not lead to multiple creations of a record) in particular when usually the ORM uses an id as a primary key and the id of a new record would not be known to the client (since it is autocreated in the database), hence cannot be part of the request. How does agavi maintain the requirement of idempotence in light of this for the PUT request.
Thanks.
© Stack Overflow or respective owner