List<MediaType> accept() {
        @SuppressWarnings("unchecked")
        final List<MediaType> cached = (List<MediaType>) cache.get(HttpHeaderNames.ACCEPT);
        if (cached != null) {
            if (cached instanceof ImmutableList) {
                return cached;
            } else {
                // Should return an immutable list.
                final List<MediaType> immutableCache = ImmutableList.copyOf(cached);
                cache.put(HttpHeaderNames.ACCEPT, immutableCache);
                return immutableCache;
            }
        }

        final List<String> acceptHeaders = getAll(HttpHeaderNames.ACCEPT);
        if (acceptHeaders.isEmpty()) {
            cache.put(HttpHeaderNames.ACCEPT, ImmutableList.of());
            return ImmutableList.of();
        }

        // Cache miss. Parse Accept headers and store it to cache.
        final List<MediaType> acceptTypes = new ArrayList<>(4);
        for (final String acceptHeader : acceptHeaders) {
            for (String accept : ACCEPT_SPLITTER.split(acceptHeader)) {
                try {
                    acceptTypes.add(MediaType.parse(accept));
                } catch (IllegalArgumentException ignored) {
                    // Ignore a malformed MediaType.
                }
            }
        }

        if (acceptTypes.size() > 1) {
            acceptTypes.sort(HttpHeadersBase::compareMediaType);
        }
        final List<MediaType> parsed = ImmutableList.copyOf(acceptTypes);
        cache.put(HttpHeaderNames.ACCEPT, parsed);
        return parsed;
    }
Adds the specified {@code setCookies} with {@link HttpHeaderNames#SET_COOKIE}.
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java