hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Krugler <kkrugler_li...@transpac.com>
Subject Re: some detailed migration questions...
Date Wed, 08 Jul 2009 23:53:36 GMT
Hi Oleg,

Thanks for correcting my responses :)

One follow-up question in-line below.

[snip]

>>>2. I want to set a different user agent per request
>>>
>>>In 3.1 I could set HostParams when executing the method. How does it work
>>>now?
>>
>>I believe you'd want to implement a RequestUserAgent class that 
>>sets up the user agent that you want.
>>
>>Seems like you might be able to do the same thing via using an 
>>HttpContext, but Oleg would know best.
>>
>
>One could also use the 'http.useragent' parameter:
>
>http://hc.apache.org/httpcomponents-client/tutorial/html/fundamentals.html#d4e337

Since Michael wanted to change the user agent on a per-request basis, 
what would be the appropriate way to do this using http.useragent?

In my code, I use this (via HttpParams) to configure the 
ThreadSafeClientConnManager that is then used when creating my 
DefaultHttpClient.

This seemed like a static one-time setup. Is there a way to use 
HttpParams to change values on a per-request basis?

[snip]

Thanks,

-- Ken
-- 
Ken Krugler
+1 530-210-6378

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message