Closed marcelorubim closed 4 years ago
Hi! We will take a look at it.
As we were needing it, I did some changes on the kumuluzee-rest-client. Probably I'll be submiting a Pull Request within a couple of days
That would be great. Thank you!
Jersey 2.29 allows registering a JettyHttpClientSupplier
so if you write your own producer method for MP rest Client this should already be possible (with jersey version bump), see https://github.com/eclipse-ee4j/jersey/pull/4089/commits/6a83e77aa444279f0e1eee2cd850588361468589
I think in general, the best approach would be to expose this in MP Rest Client and allow developer to pass their own HttpClient instance, or in this case, the supplier implementation. Adding single config option now inevitably means that you would either need to expose all config options or patch them in every time someone else needs one.
On the company that I work we need to go through to access external sites.
We are adopting KumuluzEE as the framework for our microservices. Currently the RestClient implementation does not support to add a proxy configuration like we can do with a pure Jersey client as shown bellow
ClientConfig config = new ClientConfig(); config.property(ClientProperties.PROXY_URI, "http://proxy_url"); config.property(ClientProperties.PROXY_USERNAME, "proxy_user"); config.property(ClientProperties.PROXY_PASSWORD, "proxy_password"); config.connectorProvider(new ApacheConnectorProvider()); Client client = ClientBuilder.newClient(config);
Are there any plans to add this?