Package com.enonic.xp.web

## Class WebResponse.Builder<T extends WebResponse.Builder<T>>

- java.lang.Object
- - com.enonic.xp.web.WebResponse.Builder<T>

- Direct Known Subclasses:
    `PortalResponse.Builder`
  Enclosing class:
    WebResponse

      public static class WebResponse.Builder<T extends WebResponse.Builder<T>>
      extends Object

- - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `Builder()` |
    `protected` | `Builder​(WebResponse source)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addAllCookies​(List<javax.servlet.http.Cookie> cookies)` |
    `T` | `body​(Object body)` |
    `WebResponse` | `build()` |
    `T` | `clearCookies()` |
    `T` | `clearHeaders()` |
    `T` | `contentType​(MediaType contentType)` |
    `T` | `cookie​(javax.servlet.http.Cookie cookie)` |
    `T` | `cookies​(List<javax.servlet.http.Cookie> cookies)` |
    `T` | `header​(String key, String value)` |
    `T` | `headers​(Map<String,​String> headers)` |
    `T` | `removeHeader​(String key)` |
    `T` | `status​(HttpStatus status)` |
    `T` | `webSocket​(WebSocketConfig webSocket)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Builder

          protected Builder()

    - #### Builder

          protected Builder​(WebResponse source)

  - ### Method Detail

    - #### body

          public T body​(Object body)

    - #### headers

          public T headers​(Map<String,​String> headers)

    - #### header

          public T header​(String key,
                          String value)

    - #### removeHeader

          public T removeHeader​(String key)

    - #### clearHeaders

          public T clearHeaders()

    - #### cookies

          public T cookies​(List<javax.servlet.http.Cookie> cookies)

    - #### cookie

          public T cookie​(javax.servlet.http.Cookie cookie)

    - #### clearCookies

          public T clearCookies()

    - #### contentType

          public T contentType​(MediaType contentType)

    - #### status

          public T status​(HttpStatus status)

    - #### webSocket

          public T webSocket​(WebSocketConfig webSocket)

    - #### build

          public WebResponse build()

    - #### addAllCookies

          public void addAllCookies​(List<javax.servlet.http.Cookie> cookies)