mirror of
https://github.com/jlengrand/vert.x.git
synced 2026-03-10 08:51:19 +00:00
Deprecate HTTP client request connection handler #3212 - closes
This commit is contained in:
@@ -1369,7 +1369,7 @@ The {@link io.vertx.core.http.HttpClientRequest#connection()} method returns the
|
||||
{@link examples.HTTP2Examples#example18}
|
||||
----
|
||||
|
||||
A connection handler can be set on the request to be notified when the connection happens:
|
||||
A connection handler can be set on the client to be notified when a connection has been established happens:
|
||||
|
||||
[source,$lang]
|
||||
----
|
||||
|
||||
@@ -214,8 +214,8 @@ public class HTTP2Examples {
|
||||
HttpConnection connection = request.connection();
|
||||
}
|
||||
|
||||
public void example19(HttpClientRequest request) {
|
||||
request.connectionHandler(connection -> {
|
||||
public void example19(HttpClient client) {
|
||||
client.connectionHandler(connection -> {
|
||||
System.out.println("Connected to the server");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -427,7 +427,9 @@ public interface HttpClientRequest extends WriteStream<Buffer>, ReadStream<HttpC
|
||||
*
|
||||
* @param handler the handler
|
||||
* @return a reference to this, so the API can be used fluently
|
||||
* @deprecated instead use {@link HttpClient#connectionHandler(Handler)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Fluent
|
||||
HttpClientRequest connectionHandler(@Nullable Handler<HttpConnection> handler);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user