org.springframework.http.server.reactive

Interface ServerHttpResponse

    • Method Detail

      • setStatusCode

        boolean setStatusCode(@Nullable
                              HttpStatus status)
        Set the HTTP status code of the response.
        Parameters:
        status - the HTTP status as an HttpStatus enum value
        Returns:
        false if the status code has not been set because the HTTP response is already committed, true if it has been set correctly.
      • getStatusCode

        @Nullable
        HttpStatus getStatusCode()
        Return the HTTP status code or null if not set.
      • addCookie

        void addCookie(ResponseCookie cookie)
        Add the given ResponseCookie.
        Parameters:
        cookie - the cookie to add
        Throws:
        java.lang.IllegalStateException - if the response has already been committed