@Override
    public HttpResponse execute(ClientRequestContext ctx, HttpRequest req) throws Exception {
        final URI uri = ctx.uri();
        final Cookies cookies = cookieJar.get(uri);
        if (!cookies.isEmpty()) {
            final String cookieHeader = Cookie.toCookieHeader(cookies);
            req = req.withHeaders(req.headers().toBuilder().add(HttpHeaderNames.COOKIE, cookieHeader));
            ctx.updateRequest(req);
        }
        return unwrap().execute(ctx, req).peekHeaders(headers -> {
            final List<String> setCookieHeaders = headers.getAll(HttpHeaderNames.SET_COOKIE);
            if (!setCookieHeaders.isEmpty()) {
                cookieJar.set(uri, Cookie.fromSetCookieHeaders(setCookieHeaders));
            }
        });
    }
Creates a new instance that decorates the specified {@link HttpClient}.
core/src/main/java/com/linecorp/armeria/client/cookie/CookieClient.java