Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jaxrs-dev] MP Rest Client

Hi Santiago,

Sorry for the delayed response - was out on vacation.  

I agree that most JAX-RS implementations have a type-safe client, and CXF (and possibly RestEasy?) already implement the MP Rest Client 1.0 APIs - so it would be a good idea to standardize the APIs in JAX-RS v.Next.

Some general thoughts:
* I would like to see the type-safe clients built out of ClientBuilder (rather than MP's RestClientBuilder) - we might need to "condense" the build method to include the base URI, but otherwise a client could be generated like:
     MyClient clientProxy = ClientBuilder.newBuilder().build(baseURI, MyClient.class);

* ResponseExceptionMappers - I think this is a great value-add for rest clients - it adds to the type-safety since responses could be mapped to checked exceptions which might make more sense to app developers.

* CDI/MP Config support - This might be tricky, but is one of the nicest (IMO) features of MP Rest Client.  This allows users to simply inject a rest client, avoiding the builder altogether.  The trick is that it would require a dependency on CDI and MP Config (IIUC, the MP Config APIs are also getting moved to JakartaEE, so maybe this isn't a huge problem).  

As for next steps, I could attempt to draft up a pull request that pulls in the MP Rest Client APIs into the javax.ws.rs.client.ClientBuilder class.  I probably won't have anything to review very soon though - aside from the porting work, I will also need to check on any IP issues.

Thanks for bringing this up - I'm looking forward to contributing on this,

Andy

On Thu, Mar 29, 2018 at 2:46 PM, Santiago Pericas-Geertsen <santiago.pericasgeertsen@xxxxxxxxxx> wrote:
Hi Andy,

 I wanted to bring back the discussion about the MP Rest Client API and the potential alignment with JAX-RS. There’s an open issue for that [1]. 

 Given that some JAX-RS implementations already support this type of declarative API, it would make sense to consider this as an addition to the next JAX-RS spec, perhaps even the next version that we are calling 2.2. 

 What are your general thoughts about this? And what do you think the next steps should be?

— Santiago



_______________________________________________
jaxrs-dev mailing list
jaxrs-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jaxrs-dev



Back to the top