org.apache.hc.core5.http2.protocol

## Class H2ResponseContent

- java.lang.Object
- - org.apache.hc.core5.http.protocol.ResponseContent
  - - org.apache.hc.core5.http2.protocol.H2ResponseContent

- All Implemented Interfaces:
    HttpResponseInterceptor

      @Contract(threading=IMMUTABLE)
      public class H2ResponseContent
      extends ResponseContent

  HTTP/2 compatible extension of `ResponseContent`.
  Since:
    5.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `H2ResponseContent()`
    `H2ResponseContent(boolean overwrite)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `process(HttpResponse response, EntityDetails entity, HttpContext context)` Processes the response (possibly updating or inserting) Content-Length and Transfer-Encoding headers.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### H2ResponseContent

          public H2ResponseContent()

    - #### H2ResponseContent

          public H2ResponseContent(boolean overwrite)

  - ### Method Detail

    - #### process

          public void process(HttpResponse response,
                     EntityDetails entity,
                     HttpContext context)
                       throws HttpException,
                              IOException

      Description copied from class: `ResponseContent`
      Processes the response (possibly updating or inserting) Content-Length and Transfer-Encoding headers.
      Specified by:
        `process` in interface `HttpResponseInterceptor`
      Overrides:
        `process` in class `ResponseContent`
      Parameters:
        `response` - The HttpResponse to modify.
        `entity` - the request entity details or `null` if not available
        `context` - Unused.
      Throws:
        `HttpException` - in case of an HTTP protocol violation
        `IOException` - in case of an I/O error

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