All Superinterfaces:
Serializable
All Known Implementing Classes:
EmbeddedFileHeader, StringHeader

public interface Header extends Serializable
Represents the header of an HTTP request.
  • Method Details

    • getContent

      Map<String,String> getContent(String username, char[] password, String authenticationToken, String hostname)
      Gets the HTTP header content as Map and performs macro replacements
      Parameters:
      username - HTTP username
      password - HTTP password
      authenticationToken - HTTP authentication token
      hostname - HTTP server's hostname
      Returns:
      header entries as Map
    • copy

      Header copy()
      Performs a deep copy
      Returns:
      new Header instance
    • update

      void update(UnaryOperator<String> updater)
      Updates the actual header attributes
      Parameters:
      updater - updater function
    • description

      String description()
      Gets the HTTP header string description
      Returns:
      string value
    • resolveAndParseHeader

      static Map<String,String> resolveAndParseHeader(String header, String username, char[] password, String authenticationToken, String hostname)
      Replaces each known HTTP macro in the given header then parse the given header to produce a new Map
      Parameters:
      header - header content
      username - The HTTP username
      password - The HTTP password
      authenticationToken - The HTTP Authentication Token
      hostname - The HTTP server's hostname
      Returns:
      header entries as Map