code: private static void validateForCurrentMode(HttpMessage request) throws ApiException {
  		if (!isValidForCurrentMode(request.getRequestHeader().getURI())) {
  			throw new ApiException(ApiException.Type.MODE_VIOLATION);
  		}
  	}
docs: Validates that the given request is valid for the current {@link Mode}.
  
  @param request the request that will be validated
  @throws ApiException if the request is not valid for the current {@code Mode}.
  @see #isValidForCurrentMode(URI)