As a word before giving you a direct answer, you should know that Scala 2.8.0
branch of Lift is not officially supported yet. We obviously invite bugs to fix
and so on, but there are things that could be strangely broken and we won't be
able to support you as well. You might consider switching to Scala 2.7.7 and
Lift 2.0-SNAPSHOT if you want to be on the more stable branch.
That said, DispatchPF is now PartialFunction[Req, () => Box[LiftResponse]], so
you need:
val apiDispatcher: LiftRules.DispatchPF = {
case Req("api"::_::Nil, _, _) => api(r, "index")
}
(This uses Req.unapply, FYI)
Hope that helps,
-Ross
On Feb 16, 2010, at 11:37 AM, Ilya Sterin wrote:
> I'm trying to use Lift 2.0-scala280-SNAPSHOT with Scala 2.8.0.Beta1.
>
> I'm looking to create a RESTful service. I looked at the routing
> examples available and they all seem to utilize something like...
>
>
> val apiDispatcher: LiftRules.DispatchPf = {
> case RequestMatcher(r @ RequestState("api" ::
> _ :: Nil, _) ,_) => api(r, "index")
> }
> LiftRules.statelessDispatchTable = apiDispatcher orElse
> LiftRules.statelessDispatchTable
>
>
> First, the DisipatchPf was renamed to DisipatchPF, this was an easy
> fix, at least it was still there and nested in LiftRules... But I
> don't see RequestMatcher anywhere and compiler complains....
>
> error: not found: value RequestMatcher
>
> What has RequestMatcher been replaced with, or am I missing something
> else?
>
> Ilya
>
> --
> 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.
>
--
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.