public interface ServerHttpResponse extends HttpOutputMessage, Flushable, Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this response, freeing any resources created.
|
void |
flush()
Ensure that the headers and the content of the response are written out.
|
void |
setStatusCode(HttpStatus status)
Set the HTTP status code of the response.
|
getBodygetHeadersvoid setStatusCode(HttpStatus status)
status - the HTTP status as an HttpStatus enum valuevoid flush()
throws IOException
After the first flush, headers can no longer be changed. Only further content writing and content flushing is possible.
flush in interface FlushableIOExceptionvoid close()
close in interface AutoCloseableclose in interface Closeable