object DocumentServer extends RestHelper {
import scala.concurrent.ExecutionContext.Implicits.global
def init() { ..}
def getQRCodeFuture(deviceId: String, format:String = "jpg", size:Int = 150)(implicit ec: ExecutionContext): Future[StreamingResponse] = {}
serve {
case "api" :: "qrcode" :: deviceId :: Nil Get _ => {
val size = for {
width <- S.param("size")
} yield {
try {
width.toInt
} catch {
case x:java.lang.NumberFormatException => 150
}
}
getQRCodeFuture(deviceId, "jpg", size.getOrElse(150))
}
}
--
--
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
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.