All Superinterfaces:
Serializable
All Known Implementing Classes:
EmbeddedFileBody, StringBody

public interface Body extends Serializable
Represents the body of an HTTP request.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    void
    Updates the actual body attributes using the provided updater function.
  • Method Details

    • getContent

      String getContent(String username, char[] password, String authenticationToken, String hostname)
      Gets the HTTP body content as a string and performs macro replacements.
      Parameters:
      username - The HTTP username
      password - The HTTP password as a character array
      authenticationToken - The HTTP authentication token
      hostname - 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 Body instance with the same content
    • update

      void update(UnaryOperator<String> updater)
      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