Interface ServerRequest

All Superinterfaces:
HttpRequest
All Known Subinterfaces:
RoutingRequest

public interface ServerRequest extends HttpRequest
HTTP server request.
  • Method Details

    • reset

      void reset()
      Reset request related state on the connection if any.
    • isSecure

      boolean isSecure()
      Whether this request was over a secure protocol (TLS).
      Returns:
      whether this is a secure request
    • path

      RoutedPath path()
      Path of the request.
      Specified by:
      path in interface HttpRequest
      Returns:
      routed path to obtain parameters from path pattern
    • content

      ReadableEntity content()
      Server request entity.
      Returns:
      entity
    • socketId

      String socketId()
      Identification of the client/server connection socket. The socket id is not guaranteed to be unique across server instances, or between restarts.
      Returns:
      socket id of this connection
    • serverSocketId

      String serverSocketId()
      Identification of the listener socket. The listener id is not guaranteed to be unique across server instances, or between restarts.
      Returns:
      server socket id
    • context

      Context context()
      Context of this web server request, to set and get information. The context is not registered as the current context! You can use a dedicated module (helidon-webserver-context) to add a filter that would execute all requests within a context.
      Returns:
      request context
    • listenerContext

      ListenerContext listenerContext()
      Listener context. This gives access to low level tools of Helidon WebServer, please use with care.
      Returns:
      listener context
    • security

      HttpSecurity security()
      HTTP security associated with this listener, configured on routing.
      Returns:
      security
      See Also:
    • continueSent

      boolean continueSent()
      Whether we have already sent the Status.CONTINUE_100 when expect continue is present. This method returns true for cases where expect continue is not set. This method returns false for requests without entity.
      Returns:
      whether 100-Continue was sent back to client
    • streamFilter

      void streamFilter(UnaryOperator<InputStream> filterFunction)
      Configure a custom input stream to wrap the input stream of the request.
      Parameters:
      filterFunction - the function to replace input stream of this request with a user provided one
    • proxyProtocolData

      Optional<ProxyProtocolData> proxyProtocolData()
      Access proxy protocol data for the connection on which this request was sent.
      Returns:
      proxy protocol data, if available
      See Also:
      • ListenerConfigBlueprint.enableProxyProtocol()