Jason Leveille's Blog
Web Development Intoxication
Now Viewing
Mon, 05 May 2008 10:46:24 +0000 2 Comments
This morning I got into work early (6:30am, which is early for me) and decided to add the ability to define special methods to rest-toolkit (original blog entry). “Special” in this case means adding the ability to call specific methods which allow special processing for a resource.
For example, making a rest request for news items might look something like this:
GET /news
This request should return all news items. On the other hand, the following would return all recent news items. Recent being defined in the recent method:
GET /news;recent
Those of you who are observant will notice that I have made use of the semi colon to separate the resource and the special method. Yeah, I have my Agile Web Development with Rails book open to page 415 right now. I stole your semi colon ;-). Rest toolkit also provides the ability to make requests which might also look like the following:
GET /news;recent.json GET /news;recent.xml PUT /news/1;lock
I invite you to take a closer look at the toolkit, and to provide me with feedback. I have used the application in production for an asp application, and have plans to use it in production for a Lasso application that needs to communication with punbb. I can’t guarantee that it is free of bugs (I should really write some tests for this thing), or that you won’t run into any hitches. If you do please be sure to let me know.
Comments have been disabled for this post.
2 Comments for "Rest Toolkit - User Defined Actions"
Comment 1
Doug Thompson
Comment 2
leveille