Class HeaderParameters

  • All Implemented Interfaces:
    Serializable

    public class HeaderParameters
    extends Object
    implements Serializable
    Represents the parameters of form HTTP request as key-value pairs. They are grouped according to their type. For each key, there may exists multiple values. This class also provides some utility methods such as to get the first value for a certain key.
    Author:
    XIMA MEDIA GmbH
    See Also:
    Serialized Form
    • Constructor Detail

      • HeaderParameters

        public HeaderParameters()
    • Method Detail

      • getHeader

        public String getHeader​(String headerName)
        Parameters:
        headerName - The key of a header to retrieve.
        Returns:
        The first header value for the given name. When no value exists for the given key, returns the empty string.
      • getHeaderMap

        public Map<String,​List<String>> getHeaderMap()
        Returns:
        A map with all available header parameters.
      • getHeaders

        public List<String> getHeaders​(String headerName)
        Parameters:
        headerName - The key of a header to retrieve.
        Returns:
        All header values for the given name. When no value exists for the given key, returns an empty list.
      • isHasHeader

        public boolean isHasHeader​(String headerName)
        Parameters:
        headerName - The key of a header to retrieve.
        Returns:
        Whether a header with the given name exists.
      • setHeaderMap

        public void setHeaderMap​(Map<String,​List<String>> headerMap)
        Parameters:
        headerMap - A map with all available header parameters.