hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thandra, Kiran" <Extern.Kiran.Than...@vw.com>
Subject RE: Slide and Jakarta-commons-httpClient
Date Tue, 10 Dec 2002 16:12:12 GMT
Hello ,

Need some help with using Http Client. Iam new to this technology .Basically
we are trying to post some form data and get to a internet site and get the
response back.Iam getting error 405 method not allowed.I was successfully
post this data using Innovation Http Client Api and java.net.Some times its
taking lot time to execute this request.

I think not properly using the API.

Any Suggestions are greately appreciated


org.apache.commons.httpclient.HttpClient client=new

java.net.URL url=new java.net.URL("http://xyz.abc.com");         
System.out.println("session started");
   org.apache.commons.httpclient.methods.PostMethod method = new
   org.apache.commons.httpclient.NameValuePair form_data[] = new
            form_data[0] = new
org.apache.commons.httpclient.NameValuePair("uid", "2");
		    form_data[1] = new
//org.apache.commons.httpclient.HttpState st=;

                 int i=client.executeMethod(method);
         java.io.BufferedReader in = new java.io.BufferedReader(new
  	   while ((line = in.readLine()) != null) {

      }catch(Throwable t){


Kiran Thandra



-----Original Message-----
From: Pill, Juergen [mailto:Juergen.Pill@softwareag.com]
Sent: Tuesday, December 10, 2002 9:19 AM
To: 'commons-httpclient-dev@jakarta.apache.org'
Subject: Slide and Jakarta-commons-httpClient


My name is Juergen Pill and I am committer at the Jakarta Slide project.

Currently the Slide Client API is using a very old version of the
Jakarta-Commons-HttpClient API. In our night compile, the most recent
HttpClient is used thus, giving a series of error messages (with GUMP).

I have started porting the Slide Client API to use the current version of
this HttpClient and will remove the local clone of HttpClient from Slide.

I would like to make some changes to the HttpClient API for a better Slide

1) Performance  [use _socket.setTcpNoDelay(true); in HttpConnection]. This
change was applied to Slide and if applied to HttpClient it brings ca. 5%
performance in our test suite.
2) Introduce new class HttpRequestBodyMethodBase [cloned from PutMethod] to
be used in many WebDAV Methods, let PutMethod inherit from this class.
3) HttpState: allow the HttpState class to carry the url encoding (default
UTF-8) [needed, if the content body contains URLs, which must be encoded,
see also next point]
4) HttpClient, HttpMethod, HttpMethodBase: allow the method to carry the
HttpState (or WebDAVState inherits from HttpState).
5) Modification in the Head Method to work in an authentication enviroment,
NPE if only responseBodyConsumed() is called.
6) Performance: Enable the application to send the authentication header at
the very first call (instead of waiting for a 401 response code) [not
finally solved yet]

I have changed the sources locally, both HttpClient and Slide API do compile
again, our WedDAV test suite reports no errors.

Would you like me to post the changed sources as a zipped file to this list
or would you like me to make the changes directly in the HttpClient CVS
(please note, I am not a committer (yet)). I am familiar with the HttpClient
and helped developing it, while it was hosted at the Slide project.

Best regards,

Juergen Pill

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message