• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Content-Length in HTTPPOST

Hi,

I am getting this error while fetching portfolio grom googlefinance

org.apache.http.ProtocolException: Content-Length header already present


HttpClient httpClient = new DefaultHttpClient();

HttpPost httpPost = new HttpPost("http://finance.google.com/finance/feeds/default/portfolios");

httpPost.addHeader("Authorization", "GoogleLogin auth="+authToken)

httpPost.addHeader("GData-Version", "2");
httpPost.addHeader("content-length","348");
httpPost.addHeader("Content-Type","application/x-www-form-urlencoded");


If i am removing the content length it showing Content-length required...

can any suggest smthing..????
 
Back
Top Bottom