private String encode(final String value, final String encoding) {
    try {
      return URLEncoder.encode(value, encoding);
    } catch (UnsupportedEncodingException e) {
      throw new GemfireRestException("Server has encountered unsupported encoding!");
    }
  }
AbstractBaseController class contains common functionalities required for other controllers.

@since GemFire 8.0
geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/AbstractBaseController.java