Class HttpHeaderUtils

java.lang.Object
org.a2aproject.sdk.util.HttpHeaderUtils

public final class HttpHeaderUtils extends Object
Utilities for creating case-insensitive, immutable snapshots of HTTP header maps.
  • Method Details

    • copyOfCaseInsensitive

      public static Map<String,List<String>> copyOfCaseInsensitive(Map<String,List<String>> headers)
      Creates an unmodifiable, case-insensitive copy of the given header map.

      Null keys and null value lists are silently skipped (e.g. the null status-line key from HttpURLConnection). Null elements within value lists are filtered out, and the remaining values are defensively copied.

      Parameters:
      headers - the source header map
      Returns:
      an unmodifiable, case-insensitive map