commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: HTTPClient - setting default request headers impl Q
Date Thu, 10 Jan 2002 23:00:32 GMT

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:


The first one will override any other request header with the same name, and the second one
will add the specified string to the header, and override any previously defined one.
Does that sound right to you?

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?

Should setRequestHeader override the default one?


On Thu, 10 January 2002, "Waldhoff, 
Rodney" wrote:

> HttpClient has two distinct methods--setRequestHeader and addRequestHeader.
> meth.setRequestHeader("User-Agent", "FOO");
> meth.setRequestHeader("User-Agent", "BAR");
> should yield "User-Agent: BAR"
> meth.addRequestHeader("User-Agent", "FOO");
> meth.addRequestHeader("User-Agent", "BAR");
> should yield "User-Agent: FOO; BAR"
> See
> nt/HttpMethod.html

_________________________________________________________________ Solutions for Your Life 
Check out the most exciting women's community on the Web

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message