public interface ServerHttpResponse extends ReactiveHttpOutputMessage
| Modifier and Type | Method and Description |
|---|---|
void |
addCookie(ResponseCookie cookie)
Add the given
ResponseCookie. |
MultiValueMap<String,ResponseCookie> |
getCookies()
Return a mutable map with the cookies to send to the server.
|
HttpStatus |
getStatusCode()
Return the status code set via
setStatusCode(org.springframework.http.HttpStatus), or if the status
has not been set, return the default status code from the underlying
server response. |
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 successfully set.@Nullable HttpStatus getStatusCode()
setStatusCode(org.springframework.http.HttpStatus), or if the status
has not been set, return the default status code from the underlying
server response. The return value may be null if the status code
value is outside the HttpStatus enum range, or if the underlying
server response does not have a default value.MultiValueMap<String,ResponseCookie> getCookies()
void addCookie(ResponseCookie cookie)
ResponseCookie.cookie - the cookie to addIllegalStateException - if the response has already been committed