users@jax-rs-spec.java.net

[jax-rs-spec users] Re: client proxy framework

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Wed, 6 Apr 2016 14:18:49 +0100

Reading your emails is one of the reasons I'm in this group :-), what
would I do without you posting :-) ?

On 06/04/16 14:06, Bill Burke wrote:
> Ping. Again, this would be good feature to add IMO. Its simple to
> implement and would be used by a lot of developers. I need to know
> soon if this is something the spec leads are interested in. I'm about
> to renounce my JAX-RS EG membership and hand it off to somebody else
> at Red Hat as I'm really busy with other things. If there is interest
> in this proposal, I'll stick around to write it up.
>
> On 2/28/2016 6:13 PM, Bill Burke wrote:
>> This is not a feature I came up with 1 week ago on a whim. Its a
>> proven feature that has been around for 5+ years in Resteasy and is
>> wildly popular. A number of other projects I'm involved with use it
>> to publish their REST interface as its something users have demanded.
>>
>> I'd be happy to write it up, but I need to know soon as my schedule
>> is really busy in 2016. IMO, it would probably be the most popular
>> feature of 2.1 if it was added. Even non-Resteasy users would be
>> familiar with it as its already documented in both revisions of my
>> JAX-RS RESTFul Java O'Reilly books which have also been around for 5+
>> years. :)
>>
>> Again, it would be something like this:
>>
>> interface MyRestClient {
>> @GET
>> @Product("application/json")
>> @Path("{name}")
>> Customer get(@QueryParam("name") name);
>> }
>>
>> Client client = ...;
>> MyRestClient proxy =
>> client.target("http://example.com").proxy(MyRestClient.class);
>>
>> Customer cust = proxy.get("Bill Burke");
>>
>