Interface Body
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
EmbeddedFileBody,StringBody
Represents the body of an HTTP request.
-
Method Summary
Modifier and TypeMethodDescriptioncopy()Performs a deep copy of the body.Gets a string description of the HTTP body.getContent(String username, char[] password, String authenticationToken, String hostname) Gets the HTTP body content as a string and performs macro replacements.voidupdate(UnaryOperator<String> updater) Updates the actual body attributes using the provided updater function.
-
Method Details
-
getContent
Gets the HTTP body content as a string and performs macro replacements.- Parameters:
username- The HTTP usernamepassword- The HTTP password as a character arrayauthenticationToken- The HTTP authentication tokenhostname- The remote hostname- Returns:
- The HTTP body content with resolved and parsed HTTP macros
-
copy
Body copy()Performs a deep copy of the body.- Returns:
- A new
Bodyinstance with the same content
-
update
Updates the actual body attributes using the provided updater function.- Parameters:
updater- The function to apply to the current body content
-
description
String description()Gets a string description of the HTTP body.- Returns:
- The content of the HTTP body as a string
-