开发者

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

开发者 https://www.devze.com 2023-04-12 16:15 出处:网络
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 th

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

精彩评论

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

关注公众号