Interface HttpRequest

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

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 Details

    • getHttpHeaders

      jakarta.ws.rs.core.HttpHeaders getHttpHeaders()
    • getMutableHeaders

      jakarta.ws.rs.core.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 - input stream
    • getUri

      jakarta.ws.rs.core.UriInfo getUri()
      This method *MUST* always return the same instance.
      Returns:
      uri info
    • getHttpMethod

      String getHttpMethod()
    • setHttpMethod

      void setHttpMethod(String method)
    • setRequestUri

      void setRequestUri(URI requestUri) throws IllegalStateException
      Updates the object returned by getUri().
      Parameters:
      requestUri - request uri
      Throws:
      IllegalStateException
    • setRequestUri

      void setRequestUri(URI baseUri, URI requestUri) throws IllegalStateException
      Updates the object returned by getUri().
      Parameters:
      baseUri - base uri
      requestUri - request uri
      Throws:
      IllegalStateException
    • getFormParameters

      jakarta.ws.rs.core.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

      jakarta.ws.rs.core.MultivaluedMap<String,String> getDecodedFormParameters()
    • getFormEntityParts

      default List<jakarta.ws.rs.core.EntityPart> getFormEntityParts()
      Returns for entity parts for a multipart/form-data request.
      Returns:
      the entity parts or an empty list
    • getFormEntityPart

      default Optional<jakarta.ws.rs.core.EntityPart> getFormEntityPart(String name)
      Returns the optional entity part for a multipart/form-data request.
      Parameters:
      name - the name of the entity part
      Returns:
      an optional entity part for the name
    • formParametersRead

      boolean formParametersRead()
      Were form parameters read before marshalling to body?
      Returns:
    • getAttribute

      Object getAttribute(String attribute)
      Map of contextual data. Similar to HttpServletRequest attributes
      Parameters:
      attribute - attribute name
      Returns:
      attribute
    • 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()
    • getRemoteAddress

      String getRemoteAddress()
      Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.
      Returns:
      a String containing the IP address of the client that sent the request
    • getRemoteHost

      String getRemoteHost()
      Returns the fully qualified name of the client or the last proxy that sent the request. If the engine cannot or chooses not to resolve the hostname (to improve performance), this method returns the dotted-string form of the IP address.
      Returns:
      a String containing the fully qualified name of the client