I am developing porable Java EE 7 application. For that, I am using the standard JAX-RS API. The application supports/deploys on Wildfly and Websphere. On Wildfly, the JAX-RS API is provided by RestEasy.
I would like to access a resource via a proxy-server and configure it in a way that i do not depend on RestEasy specific classes/interfaces as this would break the deployment on Websphere.
Under Websphere, i can easily provide the proxy-settins via properties on the clientBuilder:
See here for the documentation.
On ReastEasy/Wildfly, the only option to set the proxy without compile-dependency on RestEasy, was to use refelection to access the defaultProxy-method that only exists on the ResteasyClientBuilder:
It would be a nice enhancement to be able to set the proxy via properties like on Websphere.