Constructor and Description |
---|
HttpResponse() |
Modifier and Type | Method and Description |
---|---|
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 |
donwload(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
in interface Response
public Response status(int status)
Response
public Response contentType(String contentType)
Response
contentType
in interface Response
contentType
- content typepublic String contentType()
contentType
in interface Response
public Response header(String name, String value)
Response
public Response cookie(Cookie cookie)
Response
public Response cookie(String name, String value)
Response
public Response cookie(String name, String value, int maxAge)
Response
public Response cookie(String name, String value, int maxAge, boolean secured)
Response
public Response cookie(String path, String name, String value, int maxAge, boolean secured)
Response
public Response removeCookie(String name)
Response
removeCookie
in interface Response
public void donwload(String fileName, File file) throws Exception
Response
public void render(ModelAndView modelAndView)
Response
public void redirect(String newUri)
Response
public boolean isCommit()
public void send(io.netty.handler.codec.http.FullHttpResponse response)
public static HttpResponse build(io.netty.channel.ChannelHandlerContext ctx, TemplateEngine templateEngine)
Copyright © 2017. All rights reserved.