| 构造器和说明 |
|---|
HttpResponse() |
HttpResponse(Response response) |
| 限定符和类型 | 方法和说明 |
|---|---|
Body |
body() |
Response |
body(Body body)
Send body to client
|
String |
contentType()
Get current response headers: 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()
Get current response cookies
|
Set<io.netty.handler.codec.http.cookie.Cookie> |
cookiesRaw() |
void |
download(String fileName,
File file)
download some file to client
|
Response |
header(String name,
String value)
Set current response header
|
Map<String,String> |
headers()
Get current response headers
|
ModelAndView |
modelAndView() |
OutputStreamWrapper |
outputStream()
create temp file outputStream
|
void |
redirect(String newUri)
Redirect to newUri
|
Response |
removeCookie(String name)
remove cookie
|
void |
render(ModelAndView modelAndView)
Render view And Setting Data, can be modified after WebHook
|
Response |
status(int status)
Setting Response Status
|
int |
statusCode()
Get current response http status code. e.g: 200
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbadRequest, body, html, json, json, notFound, render, text, unauthorizedpublic HttpResponse(Response response)
public HttpResponse()
public int statusCode()
ResponsestatusCode 在接口中 Responsepublic Response contentType(@NonNull String contentType)
ResponsecontentType 在接口中 ResponsecontentType - content typepublic String contentType()
ResponsecontentType 在接口中 Responsepublic Response header(String name, 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 Set<io.netty.handler.codec.http.cookie.Cookie> cookiesRaw()
cookiesRaw 在接口中 Responsepublic void download(@NonNull
String fileName,
@NonNull
File file)
throws Exception
Responsepublic OutputStreamWrapper outputStream() throws IOException
ResponseoutputStream 在接口中 ResponseIOException - throw IOExceptionpublic void render(@NonNull
ModelAndView modelAndView)
Responsepublic ModelAndView modelAndView()
modelAndView 在接口中 ResponseCopyright © 2018. All rights reserved.