I just want to examine the parameters sent in a REST request. I have seen methods like S.param("paramName")
, or S.params("??")
, but I just want to see all the parameters. How can I do it?
Have checked here: http://simply.liftweb.net/index-Chapter-11.html, and also many SO threads but finding only how to get certain parameters.
Edit Adding not working suggestions to the code
Edit2 Found the problem, I commented out the return value of the request :)
My current code:
object WebserviceHandler extends RestHelper {
serve {
case "somePath" :: Nil JsonPost _ =>
//1st try
for(s <- S.request; r <- s.params) { //compiler error: "could not find implicit value for parameter c: (Unit) => net.liftweb.http.LiftResponse"
val (paramName:String, paramVals:List[String]) = r
}
//2nd try
S.request.foreach(x =>
x.paramNames.foreach(p =>
println(p) //compiler error: "scala is not an enclosing class"
)
);
//Extraction.decompose(someList) //<--- Problem- this line was commented
//...
}
}
Thanks in advance.