Interface Header
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
EmbeddedFileHeader,StringHeader
Represents the header of an HTTP request.
-
Method Summary
Modifier and TypeMethodDescriptioncopy()Performs a deep copyGets the HTTP header string descriptiongetContent(String username, char[] password, String authenticationToken, String hostname) Gets the HTTP header content asMapand performs macro replacementsresolveAndParseHeader(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 newMapvoidupdate(UnaryOperator<String> updater) Updates the actual header attributes
-
Method Details
-
getContent
Map<String,String> getContent(String username, char[] password, String authenticationToken, String hostname) Gets the HTTP header content asMapand performs macro replacements- Parameters:
username- HTTP usernamepassword- HTTP passwordauthenticationToken- HTTP authentication tokenhostname- HTTP server's hostname- Returns:
- header entries as
Map
-
copy
Header copy()Performs a deep copy- Returns:
- new
Headerinstance
-
update
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 newMap- Parameters:
header- header contentusername- The HTTP usernamepassword- The HTTP passwordauthenticationToken- The HTTP Authentication Tokenhostname- The HTTP server's hostname- Returns:
- header entries as
Map
-