Tim,
If there are common things that can be abstracted (probably the
current implicits from XmlApiHelper) by a RestHelper then it would
makes sense to do this. But for JsonApiHelper how would this be any
better then current JsonHandler? (just trying to understand the
rationale) ... or it was just an example out of the hat?
Regarding DispatchPf you get a RequestState as a parameter and from it
you can obtain a ParsePath hence you have access to the suffix.
Br's,
Marius
On Nov 8, 2:36 pm, Tim Perrett <[EMAIL PROTECTED]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---