For this URL: http://localhost:8080/reports/scores/overall.csv
The following rule doesn't match:
case Req("reports" :: "scores" :: "overall" :: Nil, "csv", GetRequest)
=>
However, this one does:
case Req("reports" :: "scores" :: "overall.csv" :: Nil, _, GetRequest)
=>
case Req("reports" :: "scores" :: Nil, "csv", GetRequest) =>
or
case Req("reports" :: "scores" :: _ :: Nil, "csv", GetRequest) =>
Not that I know, but I learn a lot by trial and error :)
Regards,
Diego
> --
> Lift, the simply functional web framework: http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
--
Diego Medina
Web Developer
di...@fmpwizard.com
http://www.fmpwizard.com
case Req("reports" :: "scores" :: "overall" :: _ , "csv", GetRequest)
From what I know, this should match no matter what you suffix that URL
with.
Btw, sorry for my English in my earlier post. Now that I read it I
realize that it sound like a baboon :) That happens when you form your
phrases from several pastes and don't check the result.
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
Yes, I know. But only because Sergey mentioned it already.Obviously Cristian didn't knew it as well - otherwise he would not have posted this topic. "Lift in Action" which helped and still helps me a lot also does not mention this method (at least searching for 'explicitlyParsedSuffixes' yields no results).
I was quite surprised that there is such a method. All examples that I came across that used some kind of pattern matching involving a ParsePath either used "_" as suffix or something like "xml". And ParsePath's Scala doc also doesn't mention LiftRules.explicitlyParsedSuffixes. Without this great community it would have been (relatively) hard to find the solution to Cristian's problem.
And as I saw this really big set of known suffixes which contains a couple of suffixes that I do not know, I was just wondering why "csv" was not included or if it could be added. And perhaps a little hint in the ParsePath Scala doc could be really helpful.
Best regardsSoerenP.S.: Didn't someone on this list mentioned the idea of adding a community wiki to the scala doc? That would be great such that non-committers could help out with some hints.
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
On Thu, Dec 15, 2011 at 8:53 AM, Sören Kress <soeren...@gmail.com> wrote:Yes, I know. But only because Sergey mentioned it already.Obviously Cristian didn't knew it as well - otherwise he would not have posted this topic. "Lift in Action" which helped and still helps me a lot also does not mention this method (at least searching for 'explicitlyParsedSuffixes' yields no results).So, why haven't you written a Wiki page about it to help others?I was quite surprised that there is such a method. All examples that I came across that used some kind of pattern matching involving a ParsePath either used "_" as suffix or something like "xml". And ParsePath's Scala doc also doesn't mention LiftRules.explicitlyParsedSuffixes. Without this great community it would have been (relatively) hard to find the solution to Cristian's problem.And that's why we have a great community to help others. But the community stays great and upbeat when people add to the documentation (wiki) rather than complaining.