Code example for HttpUriRequest

Methods: getMethod

0
			// for most other errors, retry only if request hasn't been fully sent yet 
			retry = true;
		} else { 
			// resend all idempotent requests 
			HttpUriRequest currentReq = (HttpUriRequest) context.getAttribute(ExecutionContext.HTTP_REQUEST);
			String requestType = currentReq.getMethod();
			if (!requestType.equals("POST")) {
				retry = true;
			} else { 
				// otherwise do not retry 
				retry = false;
			} 
		} 
 
		if (retry) {
			SystemClock.sleep(RETRY_SLEEP_TIME_MILLIS);
		} else { 
			exception.printStackTrace();
		}