Package ratpack.core.sse.client
Interface ServerSentEventClient
- 
 public interface ServerSentEventClientA client for request Server Sent Event streams.- Since:
- 1.10
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ServerSentEventClientof(HttpClient httpClient)Creates a client that uses the given HTTP client.default Promise<ServerSentEventResponse>request(URI uri)Makes a request for an event stream to the given location.Promise<ServerSentEventResponse>request(URI uri, Action<? super RequestSpec> action)Makes a request for an event stream to the given location.
 
- 
- 
- 
Method Detail- 
ofstatic 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
 
 - 
requestPromise<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
 
 - 
requestdefault 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
 
 
- 
 
-