Code example for SingleClientConnManager

        // params.setParameter("http.connection-manager.timeout", new 
        // Long(timeout * 1000)); 
        params.setParameter("http.protocol.head-body-timeout", timeout * 1000);
        HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
        ClientConnectionManager cm = new SingleClientConnManager(params,
        this.client = new DefaultHttpClient(cm, params);
	public void sendPostRequest(String givenLogin, String givenPass){
		class SendPostReqAsyncTask extends AsyncTask<String,Void,String>{
			protected String doInBackground(String... params) {
				// TODO Auto-generated method stub 
				String paramLogin = params[0];
				String paramPass  = params[1];
Connect your IDE to all the code out there  Get Codota for Java