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 ofResponseContent
.- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description static H2ResponseContent
INSTANCE
Singleton instance.
-
Constructor Summary
Constructors Constructor Description H2ResponseContent()
H2ResponseContent(boolean overwrite)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
process(HttpResponse response, EntityDetails entity, HttpContext context)
Processes the response (possibly updating or inserting) Content-Length and Transfer-Encoding headers.
-
-
-
Field Detail
-
INSTANCE
public static final H2ResponseContent INSTANCE
Singleton instance.- Since:
- 5.2
-
-
Method Detail
-
process
public void process(HttpResponse response, EntityDetails entity, HttpContext context) throws HttpException, java.io.IOException
Description copied from class:ResponseContent
Processes the response (possibly updating or inserting) Content-Length and Transfer-Encoding headers.- Specified by:
process
in interfaceHttpResponseInterceptor
- Overrides:
process
in classResponseContent
- Parameters:
response
- The HttpResponse to modify.entity
- the request entity details ornull
if not availablecontext
- Unused.- Throws:
HttpException
- in case of an HTTP protocol violationjava.io.IOException
- in case of an I/O error
-
-