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

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

From: Markus KARG <markus_at_headcrashing.eu>
Date: Sat, 9 Jul 2011 10:01:44 +0200

> > 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

I have to object. What a customer does in a browser is clearly a high-level
application, as the browser does lots of things for him behind his back
(like resolving relative URIs, caching, and a lot more).

What we currently do is an absolutely pure lowest level API.

Regards
Markus