waxmiguelito / iui

Automatically exported from code.google.com/p/iui
MIT License
0 stars 0 forks source link

RESTful apps - Add support for metthod attribute on links #55

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I've had a lot of success using iUI for my applications. Today I got to 
implementing a log out. The 
normal way of doing this is to GET a URI that does the logout. However this is 
neither RESTful nor a 
correct use of HTTP (POSTing to the URI would be better but its a hassle to 
write form with only a  
submit button. If you're using REST, then you would POST to a login resource to 
perform the 
authentication, GET from it to see if the user is logged in and DELETE to it to 
log out. 

Its really simple to support all the methods on links, simply change all the 
references to 
showPageByHref in the in the window's click event to use:

 iui.showPageByHref(link.href, null, link.getAttribute("method") || "GET", link, unselect);

Original issue reported on code.google.com by acvanden...@gmail.com on 5 Dec 2007 at 7:33

GoogleCodeExporter commented 9 years ago
Here's the patch to do just that:

Original comment by acvanden...@gmail.com on 10 Dec 2007 at 7:10

Attachments: