users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: setting request properties disrupts fluent api

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Thu, 25 Oct 2012 11:15:27 +0200

Just a thought: Maybe we need to distinguish between request and configuration properties in general?

Marek

On Oct 24, 2012, at 4:26 PM, Bill Burke <bburke_at_redhat.com> wrote:

> I have some features that require setting a request property. It is a bit awkward in the current API:
>
> WebTarget target = ...;
> Invocation.Builder request = target.request();
> request.configuration().setProperty("custom", "value");
> Response response = request.get();
>
> Would be cool, if there were a property() method on Invocation.Builder:
>
> Response response = client.target(...).request().property("custom", "value").get();
>
> I'll log a JIRA if people agree.
>
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com