-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Introduce the ability to automatically standup an HTTP proxy for the REST Client #41804
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
7b8e86c
to
30c5e47
Compare
...a/io/quarkus/rest/client/reactive/deployment/devservices/DevServicesRestClientHttpProxy.java
Outdated
Show resolved
Hide resolved
...a/io/quarkus/rest/client/reactive/deployment/devservices/DevServicesRestClientHttpProxy.java
Outdated
Show resolved
Hide resolved
30c5e47
to
5b977e0
Compare
I like the idea but feels "wrong" its at the just the rest client level...shouldn't it be vert.x http or even more globally? like |
The problem is that with anything not managed (Vertx HTTP Client, JDK HTTP Client, Jakarta REST Client) you don't know what the URL is. |
okey - educate me here - why is that important to know? the URL gets requested via the proxy does it not? |
This is not using the HTTP proxy headers - I tried that approach and could not get it to work with OpenAI's API so I abandoned it in favor of switching the URL under the covers. |
...a/io/quarkus/rest/client/reactive/deployment/devservices/DevServicesRestClientHttpProxy.java
Outdated
Show resolved
Hide resolved
One piece of feedback I had was to make the boundaries of the infrastructure layer for swapping out the URL of the REST Client and the code that actually does something with that URL (which in this case is to create the Vert.x HTTP Proxy). We could imagine that infrastructure could be used to run something like Wiremock or Microcks |
952b8a2
to
cefb8a7
Compare
This comment has been minimized.
This comment has been minimized.
cefb8a7
to
6b8aa26
Compare
This comment has been minimized.
This comment has been minimized.
@cescoffier what do you want to do with this one? |
I still need to review it - it's on my list for this week. Sorry for the delay. |
No problem at all, just asking :) |
...-client-config/runtime/src/main/java/io/quarkus/restclient/config/RestClientBuildConfig.java
Outdated
Show resolved
Hide resolved
.../rest-client-config/runtime/src/main/java/io/quarkus/restclient/config/RestClientConfig.java
Outdated
Show resolved
Hide resolved
The quarkus-rest-client starts a simple pass-through proxy by default which can be used as a target for Wireshark (or similar tools) in order to capture all the traffic originating from the REST Client (this really makes sense when the REST Client is used against HTTPS services). However, advances integrations that build on the REST Client can register their own proxies by using the DevServicesRestClientProxyProvider SPI
e6fc60b
to
420d44c
Compare
Status for workflow
|
Should we include this in I personally think it's completely safe |
No problem with me. |
Add HTTP Proxy Dev Service for REST Client
The
quarkus-rest-client
starts a simple pass-through proxy by defaultwhich can be used as a target for
Wireshark
(or similar tools)in order to capture all the traffic originating from the REST Client
(this really makes sense when the REST Client is used against
HTTPS services).
However, advanced integrations that build on the REST Client can
register their own proxies by using the
DevServicesRestClientProxyProvider
SPIP.S. Originally discussed in an email sent to Quarkus Dev.