org.jboss.resteasy.spi

## Interface HttpRequest

- All Known Implementing Classes:
    BaseHttpRequest, DelegatingHttpRequest, HttpServerRequest, HttpServletInputMessage, MockHttpRequest, NettyHttpRequest, PrefixedFormFieldsHttpRequest, Servlet3AsyncHttpRequest

      public interface HttpRequest

  Bridge interface between the base Resteasy JAX-RS implementation and the actual HTTP transport (i.e. a servlet container)
  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `forward(String path)`
    `ResteasyAsynchronousContext` | `getAsyncContext()`
    `Object` | `getAttribute(String attribute)` Map of contextual data.
    `Enumeration<String>` | `getAttributeNames()`
    `MultivaluedMap<String,String>` | `getDecodedFormParameters()`
    `MultivaluedMap<String,String>` | `getFormParameters()` application/x-www-form-urlencoded parameters This is here because @FormParam needs it and for when there are servlet filters that eat up the input stream
    `HttpHeaders` | `getHttpHeaders()`
    `String` | `getHttpMethod()`
    `InputStream` | `getInputStream()`
    `MultivaluedMap<String,String>` | `getMutableHeaders()`
    `ResteasyUriInfo` | `getUri()` This method *MUST* always return the same instance.
    `boolean` | `isInitial()`
    `void` | `removeAttribute(String name)`
    `void` | `setAttribute(String name, Object value)`
    `void` | `setHttpMethod(String method)`
    `void` | `setInputStream(InputStream stream)` If you are using a servlet container, this will *NOT* override the HttpServletRequest.getInputStream().
    `void` | `setRequestUri(URI requestUri)` Updates the object returned by `getUri()`.
    `void` | `setRequestUri(URI baseUri, URI requestUri)` Updates the object returned by `getUri()`.
    `boolean` | `wasForwarded()`

- - ### Method Detail

    - #### getHttpHeaders

          HttpHeaders getHttpHeaders()

    - #### getMutableHeaders

          MultivaluedMap<String,String> getMutableHeaders()

    - #### getInputStream

          InputStream getInputStream()

    - #### setInputStream

          void setInputStream(InputStream stream)

      If you are using a servlet container, this will *NOT* override the HttpServletRequest.getInputStream(). It will only override it for the resteasy HttpRequest
      Parameters:
        `stream` -

    - #### getUri

          ResteasyUriInfo getUri()

      This method *MUST* always return the same instance.

    - #### getHttpMethod

          String getHttpMethod()

    - #### setHttpMethod

          void setHttpMethod(String method)

    - #### setRequestUri

          void setRequestUri(URI requestUri)
                             throws IllegalStateException

      Updates the object returned by `getUri()`.
      Throws:
        `IllegalStateException`

    - #### setRequestUri

          void setRequestUri(URI baseUri,
                           URI requestUri)
                             throws IllegalStateException

      Updates the object returned by `getUri()`.
      Throws:
        `IllegalStateException`

    - #### getFormParameters

          MultivaluedMap<String,String> getFormParameters()

      application/x-www-form-urlencoded parameters

      This is here because @FormParam needs it and for when there are servlet filters that eat up the input stream
      Returns:
        null if no parameters, this is encoded map

    - #### getDecodedFormParameters

          MultivaluedMap<String,String> getDecodedFormParameters()

    - #### getAttribute

          Object getAttribute(String attribute)

      Map of contextual data. Similar to HttpServletRequest attributes
      Returns:

    - #### setAttribute

          void setAttribute(String name,
                          Object value)

    - #### removeAttribute

          void removeAttribute(String name)

    - #### getAttributeNames

          Enumeration<String> getAttributeNames()

    - #### getAsyncContext

          ResteasyAsynchronousContext getAsyncContext()

    - #### isInitial

          boolean isInitial()

    - #### forward

          void forward(String path)

    - #### wasForwarded

          boolean wasForwarded()

Copyright © 2014. All Rights Reserved.