Content-Length in HTTPPOST


Last Updated:

  1. roopalinasa

    roopalinasa Member This Topic's Starter

    Joined:
    Mar 24, 2010
    Messages:
    6
    Likes Received:
    0
    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...