code: @SuppressWarnings("checkstyle:abbreviationaswordinname")
      public URL constructURL() {
          String params = encodeQueryParams();
          String stringUri = url;
  
          if (params.length() > 0) {
              stringUri += "?" + params;
          }
  
          try {
              URI uri = new URI(stringUri);
              return uri.toURL();
          } catch (final URISyntaxException e) {
              throw new ApiException("Bad URI: " + stringUri, e);
          } catch (final MalformedURLException e) {
              throw new ApiException("Bad URL: " + stringUri, e);
          }
      }
docs: Build the URL for the request.
  
  @return URL for the request