hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thorsten.scherler....@juntadeandalucia.es>
Subject PostMethod now known as HttpPost
Date Thu, 13 Mar 2008 12:10:53 GMT
Hi all,

I am ATM trying to integrate latest httpclient into Droids. I have some
"old" code that is based on a prior version of the client.

Some method/class name changes I found myself but some I am not sure how
to implement them.

When my old code was:
PostMethod filePost = new PostMethod(solrBase);
filePost.addRequestHeader("Content-type", "text/xml; charset=utf-8");
filePost.addRequestHeader("User-Agent", AGENT);
filePost.setRequestBody(new URL(srcUrl).openStream());

Now I do:
HttpPost filePost = null;
filePost = new HttpPost(solrBase);
filePost.addHeader("Content-type", "text/xml; charset=utf-8");
filePost.addHeader("User-Agent", AGENT);
InputStreamEntity reqEntity = new InputStreamEntity(src, -1);

But for the following I could not found the corresponding method:
public String getResponseCharSet() {
  return filePost.getResponseCharSet();

public String getResponseBodyAsString() {
  return filePost.getResponseBodyAsString();

Can you point me to the new methods?


Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions

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

View raw message