code: public URL getUrl(String path) {
          try {
              return sslSocketFactory != null
                      ? new URL("https://" + getHostName() + ":" + getPort() + path)
                      : new URL("http://" + getHostName() + ":" + getPort() + path);
          } catch (MalformedURLException e) {
              throw new AssertionError(e);
          }
      }
docs: Returns a URL for connecting to this server.
  
  @param path the request path, such as "/".