code: public final String buildRelativeUrl() {
      StringBuilder buf = new StringBuilder();
      if (pathParts != null) {
        appendRawPathFromParts(buf);
      }
      addQueryParams(entrySet(), buf);
  
      // URL fragment
      String fragment = this.fragment;
      if (fragment != null) {
        buf.append('#').append(URI_FRAGMENT_ESCAPER.escape(fragment));
      }
      return buf.toString();
    }
docs: Constructs the portion of the URL beginning at the rooted path.
  
  <p>For the URL {@code "http://example.com/something?action=add"} this method would return
  {@code "/something?action=add"}.
  
  @return path with with leading '/' if the path is non-empty, query parameters and fragment
  @since 1.9