code: private URI buildRequestURI(String pathFragment, List<? extends NameValuePair> params) {
          try {
              String queryString = "";
              if (params != null && !params.isEmpty()) {
                  queryString = "?" + URLEncodedUtils.format(params, "UTF-8");
              }
  
              URI fullURI = new URI(LRSUrl + pathFragment + queryString);
              return fullURI;
          } catch (URISyntaxException e) {
              throw new RuntimeException("Error creating request URI", e);
          }
      }
docs: Build a URI for the REST request.
  
  <p>Note: this converts to URI instead of using a string because the activities/state API
  requires you to pass JSON as a GET parameter. The {...} confuses the RestTemplate path
  parameter handling. By converting to URI, I skip that.
  
  @param pathFragment The path fragment relative to the LRS REST base URL
  @param params The list of GET parameters to encode. May be null.
  @return The full URI to the LMS REST endpoint