Interface HttpServerRequest

All Known Implementing Classes:
DefaultHttpServerRequest, GrizzlyHttpServerRequest, JdkHttpRequest, NettyHttpServerRequest, UndertowHttpRequest

public interface HttpServerRequest
The HttpServerRequest API.

This API delivers an abstraction over the HTTP request line, the HTTP request headers and the HTTP request body.

Author:
Manfred Riem ([email protected])
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getHeader​(java.lang.String name)
    Get the header.
    java.util.Iterator<java.lang.String> getHeaderNames()
    Get the header names.
    java.util.Iterator<java.lang.String> getHeaders​(java.lang.String name)
    Get the headers.
    java.io.InputStream getInputStream()
    Get the input stream.
    java.lang.String getLocalAddress()
    Get the local address.
    java.lang.String getLocalHostname()
    Get the local hostname.
    int getLocalPort()
    Get the local port.
    java.lang.String getMethod()
    Get the method.
    default java.lang.String getProtocol()
    Get the protocol
    java.lang.String getQueryParameter​(java.lang.String name)
    Get the query parameter.
    java.lang.String getQueryString()
    Get the query string.
    java.lang.String getRemoteAddress()
    Get the remote address.
    java.lang.String getRemoteHostname()
    Get the remote hostname.
    int getRemotePort()
    Get the remote port.
    java.lang.String getRequestTarget()
    Get the request target.
  • Method Details

    • getHeader

      java.lang.String getHeader​(java.lang.String name)
      Get the header.
      Parameters:
      name - the name of the header.
      Returns:
      the value, or null.
    • getHeaders

      java.util.Iterator<java.lang.String> getHeaders​(java.lang.String name)
      Get the headers.
      Parameters:
      name - the name of the header.
      Returns:
      the potentially empty collection.
    • getHeaderNames

      java.util.Iterator<java.lang.String> getHeaderNames()
      Get the header names.
      Returns:
      the header names.
    • getInputStream

      java.io.InputStream getInputStream()
      Get the input stream.
      Returns:
      the input stream.
    • getLocalAddress

      java.lang.String getLocalAddress()
      Get the local address.
      Returns:
      the local address.
    • getLocalHostname

      java.lang.String getLocalHostname()
      Get the local hostname.
      Returns:
      the local hostname.
    • getLocalPort

      int getLocalPort()
      Get the local port.
      Returns:
      the local port.
    • getMethod

      java.lang.String getMethod()
      Get the method.
      Returns:
      the method.
    • getQueryParameter

      java.lang.String getQueryParameter​(java.lang.String name)
      Get the query parameter.
      Parameters:
      name - the name.
      Returns:
      the value, or null if not found.
    • getQueryString

      java.lang.String getQueryString()
      Get the query string.
      Returns:
      the query string.
    • getRemoteAddress

      java.lang.String getRemoteAddress()
      Get the remote address.
      Returns:
      the remote address.
    • getRemoteHostname

      java.lang.String getRemoteHostname()
      Get the remote hostname.
      Returns:
      the remote hostname.
    • getRemotePort

      int getRemotePort()
      Get the remote port.
      Returns:
      the remote port.
    • getRequestTarget

      java.lang.String getRequestTarget()
      Get the request target.
      Returns:
      the request target.
    • getProtocol

      default java.lang.String getProtocol()
      Get the protocol
      Returns:
      the protocol