Interface ServerSentEventClient


  • public interface ServerSentEventClient
    A client for request Server Sent Event streams.
    Since:
    1.10
    • Method Detail

      • of

        static ServerSentEventClient of​(HttpClient httpClient)
        Creates a client that uses the given HTTP client.
        Parameters:
        httpClient - the HTTP client to use
        Returns:
        a server sent event client
      • request

        Promise<ServerSentEventResponse> request​(URI uri,
                                                 Action<? super RequestSpec> action)
        Makes a request for an event stream to the given location.
        Parameters:
        uri - the location of the event stream
        action - the request configurer
        Returns:
        the response
      • request

        default Promise<ServerSentEventResponse> request​(URI uri)
        Makes a request for an event stream to the given location.
        Parameters:
        uri - the location of the event stream
        Returns:
        the response