jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: [Client API] Refactoring Link and Invocation

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Fri, 08 Jul 2011 13:30:30 +0100

Hi Markus

> Well,
>
>> I'm fine with
>>
>> client.request(..).pathParam(...).get();
>>
>> I don't want to see
>>
>> client.link(..).get().pathParam(...).invoke();
>>
>> because it is just not cool at all.
>>
>> And I'd like to have
>>
>> client.request(myLink).pathParam(...).get();
>>
>
> If we are now at the point where we talk about cool things we'd like to
> have, let me drop another wish:
>
> @Resource MyResourceClass target; // injected by ACC
> target.later().myJavaMethodName(HeaderParams, entity); // will do async PUT
> on @Path of MyResourceClass
>
> ...but I think that is not a LOW LEVEL API. ;-)

client.link(..).get().pathParam(...).invoke();

is just too low-level and is a bit all over the place IMHO. Technically
it works, but I believe the low-level API should still try to reflect to
some extent how users do HTTP invocations.
They open their browsers, enter service URI, add queries, they do it
first and finally they press Go (GET it).
I'm happy with Bill's Invocation offering final gets/posts - IMHO that
is more intuitive

Sergey


>
> Regards
> Markus
>