-
- All Implemented Interfaces:
public final class HeadersKt
-
-
Method Summary
Modifier and Type Method Description final static StringgetFirst(Iterable<Pair<String, String>> $self, String name)Retrieves the first header matching the given name or throws an error. final static StringgetFirstOrNull(Iterable<Pair<String, String>> $self, String name)Retrieves the first header matching the given name or returns null. final static Iterable<String>getAll(Iterable<Pair<String, String>> $self, String name)Retrieves all the headers matching the given name. final static Map<String, List<String>>toMultiMap(Iterable<Pair<String, String>> $self)Converts the header list into an equivalent multi-map. -
-
Method Detail
-
getFirst
final static String getFirst(Iterable<Pair<String, String>> $self, String name)
Retrieves the first header matching the given name or throws an error.
- Parameters:
name- Name of the header to find; names are compared case insensitively.
-
getFirstOrNull
final static String getFirstOrNull(Iterable<Pair<String, String>> $self, String name)
Retrieves the first header matching the given name or returns null.
- Parameters:
name- Name of the header to find; names are compared case insensitively.
-
getAll
final static Iterable<String> getAll(Iterable<Pair<String, String>> $self, String name)
Retrieves all the headers matching the given name.
- Parameters:
name- Name of the header values to find; names are compared case insensitively.
-
-
-
-