Modifier and Type | Class and Description |
---|---|
static class |
HttpStatusView.HttpStatusException
这个异常用于,在某个入口函数,如果你声明了 `@Fail("http:500")` 但是你真正的返回值想根据运行时决定。
那么,你就直接抛这个异常好了 |
Modifier and Type | Field and Description |
---|---|
static View |
HTTP_404 |
static View |
HTTP_500 |
static View |
HTTP_502 |
Constructor and Description |
---|
HttpStatusView(HttpServerResponse info) |
HttpStatusView(int statusCode) |
HttpStatusView(Map<?,?> map) |
Modifier and Type | Method and Description |
---|---|
static HttpStatusView.HttpStatusException |
makeThrow(int status,
String body) |
void |
render(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
Object obj) |
HttpStatusView |
setBody(String body) |
public static final View HTTP_404
public static final View HTTP_500
public static final View HTTP_502
public HttpStatusView(HttpServerResponse info)
public HttpStatusView(int statusCode)
public HttpStatusView(Map<?,?> map)
public static HttpStatusView.HttpStatusException makeThrow(int status, String body)
public HttpStatusView setBody(String body)
Copyright © 2017. All rights reserved.