@Nullable
    public static RequestTarget forClient(String reqTarget, @Nullable String prefix) {
        requireNonNull(reqTarget, "reqTarget");

        final int authorityPos = findAuthority(reqTarget);
        if (authorityPos >= 0) {
            // Note: For an absolute URI, we don't use `prefix` at all,
            //       so we can just use `reqTarget` in verbatim as a cache key.
            final RequestTarget cached = RequestTargetCache.getForClient(reqTarget);
            if (cached != null) {
                return cached;
            }

            // reqTarget is an absolute URI with scheme and authority.
            return slowAbsoluteFormForClient(reqTarget, authorityPos);
        }

        // Concatenate `prefix` and `reqTarget` if necessary.
        final String actualReqTarget;
        if (prefix == null || "*".equals(reqTarget)) {
            // No prefix was given or request target is `*`.
            actualReqTarget = reqTarget;
        } else {
            actualReqTarget = ArmeriaHttpUtil.concatPaths(prefix, reqTarget);
        }

        final RequestTarget cached = RequestTargetCache.getForClient(actualReqTarget);
        if (cached != null) {
            return cached;
        }

        // reqTarget is not an absolute URI; split by the first '?'.
        return slowForClient(actualReqTarget, null, 0);
    }
The main implementation of {@link RequestTarget#forClient(String, String)}.
core/src/main/java/com/linecorp/armeria/internal/common/DefaultRequestTarget.java