Code example for DefaultHttpRequestRetryHandler

2
		HttpConnectionParams.setSocketBufferSize(params, mDeviceInfo
				.getMaxMsgSize()); 
		httpclient.setParams(params);
 
		httpclient
				.setHttpRequestRetryHandler(new DefaultHttpRequestRetryHandler(
						3, false)); 
		URL url = new URL(mProfile.getServerUrl());
		httpHost = new HttpHost(url.getHost(), url.getPort(), url.getProtocol());
 
		if (!TextUtils.isEmpty(mProfile.proxyName())) {
			final HttpHost proxy = new HttpHost(mProfile.proxyName(), mProfile
					.proxyPort(), url.getProtocol());
			httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,
					proxy);
		} 
	} 
 
	public IResponse post(IRequest request) throws DsException {
		IResponse returnData = null;
		//tag network operation for ddms monitor.