org.apache.hc.core5.http

## Interface HttpEntityContainer

- All Known Subinterfaces:
    ClassicHttpRequest, ClassicHttpResponse
  All Known Implementing Classes:
    BasicClassicHttpRequest, BasicClassicHttpResponse

      public interface HttpEntityContainer

  Contains an `HttpEntity`.
  Since:
    5.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `HttpEntity` | `getEntity()` Obtains the message entity, if available.
    `void` | `setEntity(HttpEntity entity)` Sets an entity for this message.

- - ### Method Detail

    - #### getEntity

          HttpEntity getEntity()

      Obtains the message entity, if available.
      Returns:
        the message entity, or `null` if not available

    - #### setEntity

          void setEntity(HttpEntity entity)

      Sets an entity for this message.

      Please note that if an entity has already been set it is responsibility of the caller to ensure release of the resources that may be associated with that entity.

      Parameters:
        `entity` - the entity to set of this message, or `null` to unset

Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.