[EMAIL PROTECTED] wrote:

 > Yes, yes, I'm aware of those two, but I was wondering what I should do
 > when the default header is set.
 >
 > I guess I will just add another pair of methods:
 >
 > setDefaultRequestHeader(String,String)
 > addDefaultRequestHeader(String,String)

My vote: only *one* method: setDefaultRequestHeader(String name, String 
value). In this case, if multiple headers are required, chain them 
together in the value parameter with semicolons.

meth.addRequestHeader allows addition of multiple header values when 
some already exist. With setDefaultRequestHeader, you are assigning the 
values, presumably for the duration of the use of the method.

 > However, what should happen when someone calls
 > setRequestHeader("header", "FOO") or addRequestHeader("header", "BAR")
 > after already specifying the value for that header using:
 > setDefaultRequestHeader("header", "BAR"), for instance?

My vote: setRequestHeader should override the default value. 
addRequestHeader should add the value to the existing header value.

 > Should setRequestHeader override the default one?

In my opinion, yes. However, if the method is recycled, then the default 
value should be reinstated.

Paul


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to