Interface HttpRequest

All Known Subinterfaces:
RoutingRequest, ServerRequest

public interface HttpRequest
HTTP Request. Used for all HTTP versions.
  • Method Details

    • prologue

      HttpPrologue prologue()
      Prologue of the request.
      HTTP prologue
    • headers

      Headers of the request.
      HTTP headers
    • path

      UriPath path()
      Path of the request, with methods to get path parameters.
      HTTP path
    • query

      UriQuery query()
      Query of the request.
      HTTP query
    • remotePeer

      PeerInfo remotePeer()
      Peer info of the remote peer.
      remote peer info
    • localPeer

      PeerInfo localPeer()
      Peer info of the local side.
      local peer info
    • authority

      String authority()
      The content of the HeaderNames.HOST header or authority pseudo header (HTTP/2).
      authority of this request
    • header

      void header(Header header)
      Replace (or set) a request header. This may be useful in filters, or on re-routing.
      header - header to set
    • id

      int id()
      Request ID on this connection. In HTTP/1, this is a number between 0 and Integer.MAX_VALUE. When the number of requests reaches maximum, it starts again from 0. In HTTP/2, this is the stream id.
      id of this request on a connection
    • requestedUri

      UriInfo requestedUri()
      URI as requested by the originating client (to the best of our ability to compute it). By default, the URI is from the HeaderNames.HOST header on the current request. If requested URI discovery is enabled by configuration, additional headers (such as HeaderNames.FORWARDED) may be used to derive the originally-requested URI.
      uri info that can be used for redirects