Hey guys,
Just having a look at implementing some REST APIs and i've taken a
look at XMLApiHelper and some of the other stuff thats been posted to
the list.
Looking through the information thats around, in esme XMLApiHelper is
extended, whilst in Steve J's example rest service, he extends
SimpleController. Looking at it, it seems like we should have some
kind of abstraction for rest type services, for which the actual
service type (XML, JSON etc) can then be extended to?
trait RestHelper { ... }
trait XmlApiHelper extends RestHelper { ... }
trait JsonApiHelper extends RestHelper { ... }
Otherwise, im looking to create a service that operates like this:
GET /articles.xml => serves as xml
GET /articles.js (or .json, whichever is more appropriate) => serves
as json
and
GET /articles/1234.xml
GET /articles/1234.js
I remember there were some changes to ParsePath some time ago which
allowed you to specify a suffix, but how would I specify that in my
dispatch stuff? I've used ParsePath in rewriting before, but not in
dispatching? Is it possible?
What are peoples thoughts?
Cheers, Tim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Lift" 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/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---