构造器和说明 |
---|
HttpResponse() |
限定符和类型 | 方法和说明 |
---|---|
static HttpResponse |
build(io.netty.channel.ChannelHandlerContext ctx,
TemplateEngine templateEngine) |
String |
contentType() |
Response |
contentType(String contentType)
Setting Response ContentType
|
Response |
cookie(Cookie cookie)
add raw response cookie
|
Response |
cookie(String name,
String value)
add Cookie
|
Response |
cookie(String name,
String value,
int maxAge)
Setting Cookie
|
Response |
cookie(String name,
String value,
int maxAge,
boolean secured)
Setting Cookie
|
Response |
cookie(String path,
String name,
String value,
int maxAge,
boolean secured)
Setting Cookie
|
Map<String,String> |
cookies() |
void |
download(String fileName,
File file)
download some file to clinet
|
Response |
header(String name,
String value)
setting header
|
Map<String,String> |
headers() |
boolean |
isCommit() |
void |
redirect(String newUri)
Redirect to newUri
|
Response |
removeCookie(String name)
remove cookie
|
void |
render(ModelAndView modelAndView)
Render view And Setting Data
|
void |
send(io.netty.handler.codec.http.FullHttpResponse response) |
Response |
status(int status)
Setting Response Status
|
int |
statusCode() |
public int statusCode()
statusCode
在接口中 Response
public Response contentType(@NonNull String contentType)
Response
contentType
在接口中 Response
contentType
- content typepublic String contentType()
contentType
在接口中 Response
public Response header(@NonNull String name, @NonNull String value)
Response
public Response cookie(@NonNull String name, @NonNull String value, int maxAge)
Response
public Response cookie(@NonNull String name, @NonNull String value, int maxAge, boolean secured)
Response
public Response cookie(@NonNull String path, @NonNull String name, @NonNull String value, int maxAge, boolean secured)
Response
public Response removeCookie(@NonNull String name)
Response
removeCookie
在接口中 Response
public void download(@NonNull String fileName, @NonNull File file) throws Exception
Response
public void render(@NonNull ModelAndView modelAndView)
Response
public boolean isCommit()
public void send(@NonNull io.netty.handler.codec.http.FullHttpResponse response)
public static HttpResponse build(io.netty.channel.ChannelHandlerContext ctx, TemplateEngine templateEngine)
Copyright © 2017. All rights reserved.