Ok, I mean it this time, this is my last suggestion on the API.
On 8/30/11 11:45 AM, Sergey Beryozkin wrote:
> I guess I'm still after having Invocation dealing only with invoke().
This could simplify things as well. The problem I had before was that
it doesn't make sense to be able to set headers on a Target. It does
make sense to get() or put() or post() or delete() a Target. Since
there's now an Entity object, you won't really need to set any headers
for the common case. (And no, I don't think accept-header is a common case)
You make the common use cases fully fluent and easy. Make complex and
invoke() cases completely flexibile. Meaning you can build the request
however you like, in whatever order you like, and view the contents of
the unsent request whenever you like without having all these fluency
hang-ups.
I'd put together another revision proposal for this, but I doubt Marek
would like the idea as he is so stubbornly hung up on this fluency nonsense.
Bill
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com