[jax-rs-spec users] [jsr339-experts] Does FilterContext.getRequestBuilder() copy request?

From: Bill Burke <>
Date: Mon, 12 Dec 2011 17:43:19 -0500

On the client side, for a RequestFilter, what does
FilterContext.getReqeustBuilder return? Does it make a copy of the
existing request? It should, or at least should have a
Request.Builder.builder(Request.Builder copy); method.

BTW, this interface is really really bizarre. These are the steps to
modify/add a header:

Builder b = filterContext.getRequestBuilder();
b.header("foo", "value");

Would be much nicer to do:

ctx.getRequest().header("foo", value");

All these builder interfaces buy you very very little (except for
confusion and complexity). Its really hurting the spec, IMO.

Bill Burke
JBoss, a division of Red Hat