hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lalit Sahoo" <lali...@sonata-software.com>
Subject RE: How to test Connection timeout
Date Mon, 11 Dec 2006 10:38:47 GMT
Hi Roland,
I am using HttpConnection in the following way:

HttpConnection httpConnection = 
	
httpclient.getHttpConnectionManager().getConnectionWithTimeout(httpclien
t.getHostConfiguration(),10000);
httpConnection.open();
HttpState httpState = httpclient.getState();
int status = methodClass.execute(httpclient.getState(),httpConnection);
response = status +"\n"+methodClass.getResponseBodyAsString();

Regards,
Lalit

-----Original Message-----
From: Roland Weber [mailto:ROLWEBER@de.ibm.com]
Sent: Monday, December 11, 2006 3:40 PM
To: HttpClient User Discussion
Subject: RE: How to test Connection timeout


Hello Lalit,

> When I am using HttpConnection I am getting following error:
> 
> Error 401--Unauthorized
> 
> When I am using HttpClient instead of HttpConnection it is working
fine.

You can NOT use HttpConnection directly. All HTTP logic,
including authentication, is implemented in HttpMethodBase
or the method director. You MUST use HttpClient.

cheers,
  Roland


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


Mime
View raw message