Interface HttpRequest

All Superinterfaces:
jakarta.servlet.http.HttpServletRequest, Serializable, jakarta.servlet.ServletRequest
All Known Implementing Classes:
HttpRequestImpl, ServletRequestAdapter

public interface HttpRequest extends Serializable, jakarta.servlet.http.HttpServletRequest
An interface to take care of HTTP Requests. It parses headers, content, form and url parameters.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Request methods
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    the Accept header
    static final String
    the Accept-Encoding header
    static final String
    the Accept-Language header
    static final String
    the Cache-Control header
    static final String
    the Connection header
    static final String
    the Content-Length header
    static final String
    the Content-Type header
    static final String
    the Cookie header
    static final String
    the Host header
    static final String
    the Set-Cookie header
    static final String
    the User-Agent header
    static final String
    If the https server implementation is based on Servlets, the real ServletContext will be registered in the request attributes using this name.
    static final String
    If the https server implementation is based on Servlets, the real HttpServletRequest will be registered in the request attributes using this name.
    static final String
    If the https server implementation is based on Servlets, the real HttpServletResponse will be registered in the request attributes using this name.

    Fields inherited from interface jakarta.servlet.http.HttpServletRequest

    BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
  • Method Summary

    Modifier and Type
    Method
    Description
     
    int
     
     
    Gets a form or URL query parameter based on the name passed in.
    Gets all the form and URL query parameters
     
    Gets the URI for the current URL page.
    void
    setAttribute(String name, Object value)
     

    Methods inherited from interface jakarta.servlet.http.HttpServletRequest

    authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getHttpServletMapping, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgrade

    Methods inherited from interface jakarta.servlet.ServletRequest

    getAsyncContext, getAttributeNames, getCharacterEncoding, getContentLengthLong, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameterMap, getParameterNames, getParameterValues, getProtocol, getProtocolRequestId, getReader, getRemoteHost, getRemotePort, getRequestDispatcher, getRequestId, getScheme, getServerName, getServerPort, getServletConnection, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setCharacterEncoding, startAsync, startAsync
  • Field Details

    • HEADER_ACCEPT

      static final String HEADER_ACCEPT
      the Accept header
      See Also:
    • HEADER_ACCEPT_ENCODING

      static final String HEADER_ACCEPT_ENCODING
      the Accept-Encoding header
      See Also:
    • HEADER_ACCEPT_LANGUAGE

      static final String HEADER_ACCEPT_LANGUAGE
      the Accept-Language header
      See Also:
    • HEADER_CONTENT_TYPE

      static final String HEADER_CONTENT_TYPE
      the Content-Type header
      See Also:
    • HEADER_CONTENT_LENGTH

      static final String HEADER_CONTENT_LENGTH
      the Content-Length header
      See Also:
    • HEADER_CONNECTION

      static final String HEADER_CONNECTION
      the Connection header
      See Also:
    • HEADER_CACHE_CONTROL

      static final String HEADER_CACHE_CONTROL
      the Cache-Control header
      See Also:
    • HEADER_HOST

      static final String HEADER_HOST
      the Host header
      See Also:
    • HEADER_USER_AGENT

      static final String HEADER_USER_AGENT
      the User-Agent header
      See Also:
    • SERVLET_REQUEST

      static final String SERVLET_REQUEST
      If the https server implementation is based on Servlets, the real HttpServletRequest will be registered in the request attributes using this name.
    • SERVLET_RESPONSE

      static final String SERVLET_RESPONSE
      If the https server implementation is based on Servlets, the real HttpServletResponse will be registered in the request attributes using this name.
    • SERVLET_CONTEXT

      static final String SERVLET_CONTEXT
      If the https server implementation is based on Servlets, the real ServletContext will be registered in the request attributes using this name. Note: a ServletContext may not be registered even if HttpServletRequest and HttpServletResponse objects are registered.
  • Method Details

    • getParameter

      String getParameter(String name)
      Gets a form or URL query parameter based on the name passed in.
      Specified by:
      getParameter in interface jakarta.servlet.ServletRequest
      Parameters:
      name -
    • getParameters

      Map getParameters()
      Gets all the form and URL query parameters
      Returns:
      All the form and URL query parameters
    • getURI

      URI getURI()
      Gets the URI for the current URL page.
      Returns:
      The URI
    • getContentLength

      int getContentLength()
      Specified by:
      getContentLength in interface jakarta.servlet.ServletRequest
    • getContentType

      String getContentType()
      Specified by:
      getContentType in interface jakarta.servlet.ServletRequest
    • getAttribute

      Object getAttribute(String name)
      Specified by:
      getAttribute in interface jakarta.servlet.ServletRequest
    • setAttribute

      void setAttribute(String name, Object value)
      Specified by:
      setAttribute in interface jakarta.servlet.ServletRequest
    • getRemoteAddr

      String getRemoteAddr()
      Specified by:
      getRemoteAddr in interface jakarta.servlet.ServletRequest