Interface Session.Client

All Superinterfaces:
All Known Implementing Classes:
Enclosing interface:

public static interface Session.Client extends Session

The client-side HTTP/3 API representing a connection with a server.

Once a Session has been obtained, it can be used to make HTTP/3 requests:

 Session session = ...;
 HeadersFrame headersFrame = ...;
 session.newRequest(headersFrame, new Stream.Listener()
     public void onResponse(Stream stream, HeadersFrame frame)
         // Response headers received.
See Also:
  • Method Details

    • newRequest

      Makes a request by creating a HTTP/3 stream and sending the given HEADERS frame.

      frame - the HEADERS frame containing the HTTP request headers
      listener - the listener that gets notified of stream events
      a CompletableFuture that is notified of the stream creation