Interface SdkHttpFullResponse

All Superinterfaces:
SdkHttpHeaders, SdkHttpResponse, Serializable, ToCopyableBuilder<SdkHttpResponse.Builder,SdkHttpResponse>

@Immutable public interface SdkHttpFullResponse extends SdkHttpResponse
An immutable HTTP response with a possible HTTP body.

All implementations of this interface MUST be immutable. Instead of implementing this interface, consider using builder() to create an instance.

  • Method Details

    • builder

      static SdkHttpFullResponse.Builder builder()
      Returns:
      Builder instance to construct a DefaultSdkHttpFullResponse.
    • toBuilder

      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<SdkHttpResponse.Builder,SdkHttpResponse>
      Returns:
      a builder for type T
    • content

      Returns the optional stream containing the payload data returned by the service. Note: an AbortableInputStream is returned instead of an InputStream. This allows the stream to be aborted before all content is read, which usually means destroying the underlying HTTP connection. This may be implemented differently in other HTTP implementations.

      When the response does not include payload data, this will return Optional.empty().

      Returns:
      The optional stream containing the payload data included in this response, or empty if there is no payload.