Package 

Class AbstractHttpEntity

    • Method Summary

      Modifier and Type Method Description
      String getBody() Return the captured HTTP body if one has been set, or null.
      void setBody(@Nullable() String body) Set or clear the captured body.
      long getBodyLength() Return the body length (as set with setBodyLength) or -1 if none has been set.
      void setBodyLength(long bodyLength) Change the reported size of the request body size (in bytes).
      void addHeader(@NonNull() String name, @NonNull() String value) Add a header to this reported HTTP entity.
      void removeHeader(@NonNull() String name) Remove the specified header by name (case-sensitive).
      Set<String> getHeaderNames() Return the headers that are set for this HTTP entity.
      String getHeader(@NonNull() String headerName) Return the HTTP header by name or an empty string if the header is not present.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setBody

         void setBody(@Nullable() String body)

        Set or clear the captured body.

        Parameters:
        body - the body to report
      • setBodyLength

         void setBodyLength(long bodyLength)

        Change the reported size of the request body size (in bytes).

        Parameters:
        bodyLength - the number of bytes in the request body
      • addHeader

         void addHeader(@NonNull() String name, @NonNull() String value)

        Add a header to this reported HTTP entity.

        Parameters:
        name - the name of the header
        value - the value of the header
      • removeHeader

         void removeHeader(@NonNull() String name)

        Remove the specified header by name (case-sensitive).

        Parameters:
        name - the header to remove
      • getHeader

        @NonNull() String getHeader(@NonNull() String headerName)

        Return the HTTP header by name or an empty string if the header is not present.

        Parameters:
        headerName - the header name (case-sensitive)