On 01/29/2010 02:39 PM, Vladimir Dronnikov wrote:
> Hi!
>
> Wonder how people implement the subj?
>
> Suppose I've no javascript. What URL should bring me to a page for
> dangerous operation confirmation?
>
> TIA,
> --
> Vladimir
>
>   


Confirmation is a process that is not fully compatible with (pure) REST,
because requests must not be dependent of previous ones. I use DELETE to
actually remove/delete a resource, but exclusively using javascript GUIs
-- having, then a separation between GUI "resources" (html etc forms)
and JSON resources which is data that goes to and from the GUIs.

But if you need one, think of it as a "Deletion resource". POST to
create a "deletion resource". The response is a form containing a nonce
token, has status 201 created and the URI to the new "resource" is
either given through Location header or in the body of response -- the
body which is then a form, containing nonce hidden field and primed for
a DELETE operation, and a button asking to "Confirm".

Perhaps an overkill, but my point is in paradigm shift between "actions"
and restful "resources".



Vlad

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to