Hi,
 
I am using Spring and need to inject an instance of HttpClient into a bean.  
Pretty straightforward.
 
The part I am stuck on is figuring out how to set HTTP header parameters (ex. 
Content-Type, Cache-Control) on the client instance before I inject it.
 
I have code that sets the HTTP header parameters on the HttpMethod but there as 
far as I can tell, in order add the HttpMethod to the client I would have to 
call client.executeMethod():
 
        HttpMethod method = new GetMethod();
 
        // Set the content header for xml        
method.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
 
        // Set the cache-control        
method.setRequestHeader("Cache-Control",  "no-cache");
 
 
Any ideas?
Thanks
 

 
_________________________________________________________________
Stay organized with simple drag and drop from Windows Live Hotmail.
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_102008

Reply via email to