-
Notifications
You must be signed in to change notification settings - Fork 39
Introduce OriginRequestProvider #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
this seems like a breaking change |
If there's a breaking change, it's not intentional, where is it? |
@vietj if you're referring to the new method But that won't break user applications, afaik |
my point is that I am annoyed to do a vertx 5 release with deprecations from day 1 :-) |
Ha, then I can remove the methods altogether and deprecate them in Vert.x 4 |
I also feel something is not right with the fact that the method takes an http client a argument which seem specific and might require more breaking change in the future |
The current |
yes, it wasn't a great choice actually
…On Fri, May 9, 2025 at 9:38 AM Thomas Segismont ***@***.***> wrote:
*tsegismont* left a comment (eclipse-vertx/vertx-http-proxy#121)
<#121 (comment)>
I also feel something is not right with the fact that the method takes an
http client a argument which seem specific and might require more breaking
change in the future
The current Proxy#originRequestProvider method does the same thing, and
the reason is you need an HttpClient to provide the client request to the
origin server.
—
Reply to this email directly, view it on GitHub
<#121 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABXDCVOUF5P3GTGKX6ZDIL25RLQRAVCNFSM6AAAAAB4T7FASGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNRVGQ4DQOBWHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Why? It gives users the opportunity to configure http client request stuff (e.g. |
4d828b8
to
4dc78e7
Compare
Closes eclipse-vertx#35, closes eclipse-vertx#44 OriginRequestProvider is a Vert.x API type that unifies all the origin selection methods currently present as overloaded methods in HttpProxy. OriginRequestProvider being a FunctionalInterface, users can provide one in the form of a lambda. OriginRequestProvider is a little different from the existing contract. Instead of the proxied request and HTTP client as parameters, it has the ProxyContext (that exposes all the proxy data and the client). This allows implementations to make a decision on the modifications interceptors can make (including when the request is an upgrade to WebSocket). See eclipse-vertx#44 It also allows interceptor and provider to exchange data via the ProxyContext attachments. See eclipse-vertx#35 Signed-off-by: Thomas Segismont <[email protected]>
4dc78e7
to
63cb4fd
Compare
@vietj I changed the content and updated the description accordingly. PTAL |
Closes #35, closes #44
OriginRequestProvider
is a Vert.x API type that unifies all the origin selection methods currently present as overloaded methods inHttpProxy
.OriginRequestProvider
being a@FunctionalInterface
, users can provide one in the form of a lambda.OriginRequestProvider
is a little different from the existing contract.Instead of the proxied request and HTTP client as parameters, it has the
ProxyContext
(that exposes all the proxy data and the client).This allows implementations to make a decision on the modifications interceptors can make (including when the request is an upgrade to WebSocket). See #44
It also allows interceptors and providers to exchange data via the
ProxyContext
attachments. See #35