public interface ServerHttpResponse extends ReactiveHttpOutputMessage
| Modifier and Type | Method and Description |
|---|---|
void |
addCookie(ResponseCookie cookie)
Add the given
ResponseCookie. |
MultiValueMap<java.lang.String,ResponseCookie> |
getCookies()
Return a mutable map with the cookies to send to the server.
|
HttpStatus |
getStatusCode()
Return the HTTP status code or
null if not set. |
boolean |
setStatusCode(HttpStatus status)
Set the HTTP status code of the response.
|
beforeCommit, bufferFactory, isCommitted, setComplete, writeAndFlushWith, writeWithgetHeadersboolean setStatusCode(@Nullable HttpStatus status)
status - the HTTP status as an HttpStatus enum valuefalse if the status code has not been set because the HTTP response
is already committed, true if it has been set correctly.@Nullable HttpStatus getStatusCode()
null if not set.MultiValueMap<java.lang.String,ResponseCookie> getCookies()
void addCookie(ResponseCookie cookie)
ResponseCookie.cookie - the cookie to addjava.lang.IllegalStateException - if the response has already been committed