org.springframework.http.server

Interface ServerHttpResponse

    • Method Detail

      • setStatusCode

        void setStatusCode(HttpStatus status)
        Set the HTTP status code of the response.
        Parameters:
        status - the HTTP status as an HttpStatus enum value
      • flush

        void flush()
            throws java.io.IOException
        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.

        Specified by:
        flush in interface java.io.Flushable
        Throws:
        java.io.IOException
      • close

        void close()
        Close this response, freeing any resources created.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable