| 构造器和说明 |
|---|
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 在接口中 Responsepublic Response contentType(@NonNull String contentType)
ResponsecontentType 在接口中 ResponsecontentType - content typepublic String contentType()
contentType 在接口中 Responsepublic Response header(@NonNull String name, @NonNull String value)
Responsepublic Response cookie(@NonNull String name, @NonNull String value, int maxAge)
Responsepublic Response cookie(@NonNull String name, @NonNull String value, int maxAge, boolean secured)
Responsepublic Response cookie(@NonNull String path, @NonNull String name, @NonNull String value, int maxAge, boolean secured)
Responsepublic Response removeCookie(@NonNull String name)
ResponseremoveCookie 在接口中 Responsepublic void download(@NonNull
String fileName,
@NonNull
File file)
throws Exception
Responsepublic void render(@NonNull
ModelAndView modelAndView)
Responsepublic 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.