eclipse-vertx / vert.x

Vert.x is a tool-kit for building reactive applications on the JVM
http://vertx.io
Other
14.26k stars 2.07k forks source link

Access the vertx instance from HttpClient objects #5261

Closed wzy1935 closed 1 month ago

wzy1935 commented 2 months ago

Refers to https://github.com/eclipse-vertx/vertx-http-proxy/pull/92

Hi, I'm contributing the API in vertx-http-proxy and there's a method I need to access the vertx instance from the HttpClient object, but currently there's no way to do this.

It could if we export the HttpClientInternal interface, by moving it from io.vertx.core.internal.http.impl to io.vertx.core.internal.http, then I can call it like this:

// client is an instance of HttpClient
Vertx vertx = ((HttpClientInternal) client).vertx();

Should we perform this change? I can make a PR for it.

vietj commented 1 month ago

right, this has not been done yet, will do that very soon @wzy1935