jakartaee / rest

Jakarta RESTful Web Services
Other
361 stars 116 forks source link

Standardized API for creating proxy client #598

Open mkarg opened 6 years ago

mkarg commented 6 years ago

There are JAX-RS implementations that can build a client proxy. For example, CXF: https://cxf.apache.org/javadoc/latest/org/apache/cxf/jaxrs/client/JAXRSClientFactory.html. It is a good idea to standardize such factory APIs.

mkarg commented 6 years ago

Originally reported by @struberg

mkarg commented 6 years ago

@chkal @spericas @andymc12 What do you think?

andymc12 commented 6 years ago

I am definitely in favor. Personally, I'd like to see some of the work done in the MicroProfile Rest Client project migrate into the JAX-RS spec. More info here: http://microprofile.io/project/eclipse/microprofile-rest-client

spericas commented 6 years ago

I agree with @andymc12. I think we need to align this effort with the MP (See https://github.com/eclipse-ee4j/jaxrs-api/issues/56). I also think the MP Rest Client should be made part of JAX-RS. I'm not sure what's the best alias to start this discussion.

chkal commented 6 years ago

+1 for aligning with the MicroProfile Rest Client. Perhaps we could compare the MicroProfile client approach to the one implemented by CXF and other vendors to see if there are any fundamental differences.

derekm commented 6 years ago

Jersey has the most succinct Proxy Client factory API with the most reuse of other JAX-RS components (that is, ClientBuilder & WebTarget): https://jersey.github.io/apidocs/latest/jersey/org/glassfish/jersey/client/proxy/package-summary.html

asoldano commented 6 years ago

Speaking of client proxies... RESTEasy has http://docs.jboss.org/resteasy/docs/3.5.0.Final/userguide/html/RESTEasy_Client_Framework.html#d4e2380

pa314159 commented 5 years ago

There is one more client proxy implementation at https://github.com/pa314159/rest-bridge that has been started some time ago and resurected recently.

The implementations is now compatible with Eclipse-MP-1.2 so I think unifying such an API with Eclipse-MP would be possible...