I set the HttpParameters to a HttpClient.
Now i want to test whether they are set correctly. Actually i was doing it this way (based on this answer by kuester2000):
public class MyHttpClient extends DefaultHttpClient {
public MyHttpClient(int tc, int ts) {
HttpParams httpParameters = new BasicHttpParams();
// Set the timeout in milliseconds until a connection is established.
int timeoutConnection = tc;
HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);
// Set the default socket timeout (SO_TIMEOUT)
// in milliseconds which is the timeout for waiting for data.
int timeoutSocket = ts;
HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);
ClientConnectionManager mgr = this.getConnectionManager();
this.setParams(httpParameters);
}
}
and creating an instance of it like this:
public static MyHttpClient httpclient = new MyHttpClient(5000, 5000);
How to know if this actually worked.
I tried this :
httpclient.getParams().toString();
and i got this as an output:
org.apache.http.params.BasicHttpParams@40520f20
seems like its the Default Params
but not the one i set.