1. Check out our companion app, Forums for Android! Download from Google Play

Content-Length in HTTPPOST

Discussion in 'Application Development' started by roopalinasa, May 7, 2010.

  1. roopalinasa

    roopalinasa Member
    Thread Starter
    25

    Mar 24, 2010
    6
    0
    25
    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..????
     

    Advertisement

Share This Page

Loading...