How is it possible to simply access to get and post attributes in lift framework inside RestHelper? There are no any explicit examples about it in documentation :(
package my.domain
import net.liftweb.http._
import net.liftweb.http.rest._
import net.liftweb.json.JsonAST._
import net.liftweb.json._
import net.liftweb.common.{Box,Full,Empty,Failure,ParamFailure}
import net.liftweb.mapper._
import ru.dmteam.model.{RssItem}
object ContentRest extends RestHelper {
def getq: String = {
val q = S.param("q")
q.toString
}
serve {
case "api" :: "static" :: _ XmlGet _=> <b>{getq}</b>
}
}
I want to understand how to make lift show value of q
when I am requesting http://localhost:8080/api/static.xml?q=test