接口 ServerHttpResponse
- 所有超级接口:
AutoCloseable,Closeable,Flushable,HttpMessage,HttpOutputMessage
- 所有已知实现类:
DelegatingServerHttpResponse,RequestContext.RequestContextHttpOutputMessage,ServletServerHttpResponse
Represents a server-side HTTP response.
- 从以下版本开始:
- 3.0
- 作者:
- Arjen Poutsma
-
方法概要
修饰符和类型方法说明voidclose()Close this response, freeing any resources created.voidflush()Ensure that the headers and the content of the response are written out.voidsetStatusCode(HttpStatusCode status) Set the HTTP status code of the response.从接口继承的方法 cn.taketoday.http.HttpMessage
getHeaders从接口继承的方法 cn.taketoday.http.HttpOutputMessage
getBody
-
方法详细资料
-
setStatusCode
Set the HTTP status code of the response.- 参数:
status- the HTTP status as an HttpStatus enum value
-
flush
Ensure that the headers and the content of the response are written out.After the first flush, headers can no longer be changed. Only further content writing and content flushing is possible.
- 指定者:
flush在接口中Flushable- 抛出:
IOException
-
close
void close()Close this response, freeing any resources created.- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable
-