hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lothar Krenzien <lkrenz...@web.de>
Subject Re: cant't get HttpClient working
Date Mon, 09 Jan 2006 15:35:10 GMT

After playing around a while I found out that in PostMethod.setRequestEntity() the method
clearRequestBody() is called.  In that method all parameters will be deleted by this.params.clear().
Is that realy wanted ? Maybe super.clearRequestBody() needs to be called ? And when I first
call setRequestEntity() and then addParameters() the requestBody will be deleted. So actually
I can't set parameters and data for the body at same time !?

I'm using version 3.0.


Thanks, Lothar

"HttpClient User Discussion" <httpclient-user@jakarta.apache.org> schrieb am 08.01.06
16:30:50:
> 
> Hello Lothar,
> 
> > HttpClient client = new HttpClient();
> > PostMethod method = new PostMethod(URL);
> > method.setRequestHeader("Content-type", "text/xml; charset=ISO-8859-1");		
> 
> Content type "text/xml" is highly inappropriate for posted data. Don't
> set the content type at all, let the PostMethod insert the correct one.
> 
> hope that helps,
>   Roland
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 


______________________________________________________________________
XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!		
Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130


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


Mime
View raw message