Thanks for the response but that doesn't work. I get the following
error.
[WARNING] API.scala:51: error: ')' expected but identifier found.
[WARNING] case Req(List("api" , "package" , packageName : _*), "",
GetRequest) =>
-Andy
On Oct 29, 2:32 pm, Naftoli Gugenheim <[email protected]> wrote:
> List("api", "package", packageName : _* )
>
> -------------------------------------
>
> andythedestroyer<[email protected]> wrote:
>
> Hello,
>
> I am creating a rest api for an app and am having trouble extracting a
> var from the matched request.
>
> Object MyApi extends XMLHelperApi {
> def dispatch : LiftRules.DispatchPF = {
> case Req(List("api","package", packageName), _, GetRequest)
> =>
> () => myMethodThatDoesSomething(packageName)
> }
>
> }
>
> The packageName variable is in the form similar but not exactly like
> java package names ( my.company.package:key=value )
>
> so the rest url would be
>
> http://domain.com/api/package/my.company.package%3Akey%3Dvalue
>
> This should work and the package var in my case expression should be
> "my.company.package:key=value" but it is just "my".
>
> I have gone through "The Definitive Guide to Lift" and the group
> postings but have had no luck so far. I know this should be easy and I
> am just missing something.
>
> Thanks
> Andy
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---