code: protected String encode(String param) throws Exception {
      String result = URLEncoder.encode(param, "UTF-8");
      return result;
    }
docs: request parameter encoding
  
  @param param
  @return an encoded url parameter
  @throws Exception