Class MapCollapseUtils

java.lang.Object
io.micronaut.function.aws.proxy.MapCollapseUtils

@Internal public final class MapCollapseUtils extends Object
Utility methods for collapsing headers.
  • Method Details

    • getSingleValueHeaders

      public static Map<String,String> getSingleValueHeaders(io.micronaut.http.MutableHttpHeaders headers)
      Collapse the headers into a single value map.
      Parameters:
      headers - The headers
      Returns:
      The map
    • getMultiHeaders

      public static Map<String,List<String>> getMultiHeaders(io.micronaut.http.MutableHttpHeaders headers)
      Collapse the headers into a multi value map.
      Parameters:
      headers - The headers
      Returns:
      The map
    • collapse

      public static Map<String,List<String>> collapse(Map<String,List<String>> multi, Map<String,String> single)
      Collapse the aws single and multi headers into a single value map.
      Parameters:
      multi - The multi value map
      single - The single value map
      Returns:
      The map
    • collapse

      public static Map<String,String> collapse(Map<String,List<String>> input)
      Collapse a map whose value is a list of strings into a map whose value is a comma separated string.
      Parameters:
      input - Map with key String and value List of Strings
      Returns:
      Map with key String and value String with comma separated values