开发者

How to send a 404 (or another specific) HTTP error in Lift?

As my web application is currently a REST-only system (with no pages meant for us开发者_如何学Goer view) I'd like to send a 404 HTTP error when index page is requested. How to do this in Lift?


Does this work for you?

serve {
  case XmlPut("order" :: orderId :: Nil, (_, _)) =>
    Full(NotFoundResponse())
}

... or just Empty box. With an empty box later serve blocks may override.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜