code: private static String encoder(final String toEncode) {
          try {
              return URLEncoder.encode(toEncode, URL_ENCODING);
          } catch (UnsupportedEncodingException ex) {
              LOG.warn("Failed to encode: {}", ex.getMessage(), ex);
              return "";
          }
      }
docs: Encode a string for use in the URL
  
  @param toEncode
  @return