Package com.enonic.xp.web

## Class WebResponse

- java.lang.Object
- - com.enonic.xp.web.WebResponse

- Direct Known Subclasses:
    `PortalResponse`

      @PublicApi
      public class WebResponse
      extends Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `WebResponse.Builder<T extends WebResponse.Builder<T>>` |

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `WebResponse​(WebResponse.Builder<?> builder)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static WebResponse.Builder<?>` | `create()` |
    `static WebResponse.Builder<?>` | `create​(WebResponse source)` |
    `String` | `getAsString()` | Deprecated.
    `Object` | `getBody()` |
    `MediaType` | `getContentType()` |
    `ImmutableList<javax.servlet.http.Cookie>` | `getCookies()` |
    `ImmutableMap<String,​String>` | `getHeaders()` |
    `HttpStatus` | `getStatus()` |
    `WebSocketConfig` | `getWebSocket()` |

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

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

- - ### Constructor Detail

    - #### WebResponse

          protected WebResponse​(WebResponse.Builder<?> builder)

  - ### Method Detail

    - #### create

          public static WebResponse.Builder<?> create()

    - #### create

          public static WebResponse.Builder<?> create​(WebResponse source)

    - #### getStatus

          public HttpStatus getStatus()

    - #### getContentType

          public MediaType getContentType()

    - #### getBody

          public Object getBody()

    - #### getHeaders

          public ImmutableMap<String,​String> getHeaders()

    - #### getAsString

          @Deprecated
          public String getAsString()

      Deprecated.

    - #### getCookies

          public ImmutableList<javax.servlet.http.Cookie> getCookies()

    - #### getWebSocket

          public WebSocketConfig getWebSocket()