Interface HttpRequestHead

All Known Subinterfaces:
HttpServerRequest, WebServerRequest

public interface HttpRequestHead
The state of the HTTP request head:
  • Method / URI
  • Headers
  • Method Details

    • method

      HttpMethod method()
      Returns:
      the HTTP method for the request.
    • uri

      String uri()
      Returns:
      the URI of the request. This is usually a relative URI
    • path

      String path()
      Returns the path component of the HTTP request URI.

      This is the raw, non-normalized path as received from the client. It may contain duplicated separators or traversal segments such as "..".

      For security-sensitive logic (for example access control, routing or filesystem checks), applications should prefer using a normalized path provided by the framework instead of relying on this raw value.

      Returns:
      the raw path component of the request URI
    • query

      String query()
      Returns:
      the query part of the uri. For example someparam=32&someotherparam=x
    • headers

      MultiMap headers()
      Returns:
      the headers
    • getHeader

      default String getHeader(String headerName)
      Return the first header value with the specified name
      Parameters:
      headerName - the header name
      Returns:
      the header value
    • getHeader

      default String getHeader(CharSequence headerName)
      Return the first header value with the specified name
      Parameters:
      headerName - the header name
      Returns:
      the header value