Package io.micronaut.function.aws.proxy
Class MapCollapseUtils
java.lang.Object
io.micronaut.function.aws.proxy.MapCollapseUtils
Utility methods for collapsing headers.
-
Method Summary
Modifier and TypeMethodDescriptionCollapse a map whose value is a list of strings into a map whose value is a comma separated string.Collapse the aws single and multi headers into a single value map.getMultiHeaders
(io.micronaut.http.MutableHttpHeaders headers) Collapse the headers into a multi value map.getSingleValueHeaders
(io.micronaut.http.MutableHttpHeaders headers) Collapse the headers into a single value map.
-
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 mapsingle
- The single value map- Returns:
- The map
-
collapse
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
-