org.springframework.http.server

## Interface ServerHttpResponse

- All Superinterfaces:
    AutoCloseable, Closeable, HttpMessage, HttpOutputMessage
  All Known Implementing Classes:
    ServletServerHttpResponse

      public interface ServerHttpResponse
      extends HttpOutputMessage, Closeable

  Represents a server-side HTTP response.
  Since:
    3.0
  Author:
    Arjen Poutsma

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close this response, freeing any resources created.
    `void` | `setStatusCode(HttpStatus status)` Set the HTTP status code of the response.

    - ### Methods inherited from interface org.springframework.http.HttpOutputMessage

      `getBody`

    - ### Methods inherited from interface org.springframework.http.HttpMessage

      `getHeaders`

- - ### 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

    - #### close

          void close()

      Close this response, freeing any resources created.
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `Closeable`