public class Response extends Object
| Constructor and Description |
|---|
Response(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpResponse res) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCookie(Cookie cookie) |
void |
addHeader(String name,
String value) |
byte[] |
getContent() |
String |
getContentStr() |
String |
getContentType() |
Set<Cookie> |
getCookies() |
String |
getHeader(String name) |
Iterator<String> |
getHeaderNames() |
boolean |
isCommitted() |
void |
send() |
void |
sendContent(byte[] content) |
void |
sendError(int status) |
void |
sendError0(int status) |
void |
sendRedirect(String location) |
void |
setContentType(String contentType) |
void |
setCookies(Set<Cookie> cookies) |
void |
setHeader(String name,
String value) |
void |
setKeepAlive(boolean keepAlive) |
void |
setStatus(int status) |
public Response(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpResponse res)
public void setKeepAlive(boolean keepAlive)
public boolean isCommitted()
public void setStatus(int status)
public String getContentType()
public void setContentType(String contentType)
public void addCookie(Cookie cookie)
public String getContentStr()
public byte[] getContent()
public void sendError0(int status)
public void sendError(int status)
public void sendRedirect(String location)
public void sendContent(byte[] content)
public void send()
Copyright © 2009–2019 B3log. All rights reserved.