public static void encodeSetCookieHeader(HeaderFields headers, List<Cookie> cookies) {
        headers.remove(HttpHeaders.Names.SET_COOKIE);
        for (Cookie cookie : cookies) {
            headers.add(HttpHeaders.Names.SET_COOKIE, Cookie.toSetCookieHeaders(List.of(cookie)));
        }
    }
Helper for encoding/decoding cookies on request/response.

@author bjorncs
container-core/src/main/java/com/yahoo/jdisc/http/CookieHelper.java