http-client/src/main/java/io/airlift/http/client/HttpUriBuilder.java
public HttpUriBuilder appendPath(String path)
    {
        requireNonNull(path, "path is null");

        StringBuilder builder = new StringBuilder(this.path);
        if (!this.path.endsWith("/")) {
            builder.append('/');
        }

        if (path.startsWith("/")) {
            path = path.substring(1);
        }

        builder.append(path);

        this.path = builder.toString();

        return this;
    }
public HttpUriBuilder appendPath(String path)
    {
        requireNonNull(path, "path is null");

        StringBuilder builder = new StringBuilder(this.path);
        if (!this.path.endsWith("/")) {
            builder.append('/');
        }

        if (path.startsWith("/")) {
            path = path.substring(1);
        }

        builder.append(path);

        this.path = builder.toString();

        return this;
    }
public HttpUriBuilder appendPath ( String path ) { requireNonNull ( path , "path is null" ) ; StringBuilder builder = new StringBuilder ( this . path ) ; if ( ! this . path . endsWith ( "/" ) ) { builder . append ( ' ' ) ; } if ( path . startsWith ( "/" ) ) { path = path . substring ( 1 ) ; } builder . append ( path ) ; this . path = builder . toString ( ) ; return this ; }
Append an unencoded path.
<p>
All reserved characters except '/' will be percent-encoded. '/' are considered as path separators and
appended verbatim.
Append an unencoded path . <p > All reserved characters except / will be percent - encoded . / are considered as path separators and appended verbatim .