@Contract(threading=IMMUTABLE) public class RequestIfRange extends Object implements org.apache.hc.core5.http.HttpRequestInterceptor
The RequestIfRange
interceptor ensures that the request adheres to the RFC guidelines for the 'If-Range' header.
The "If-Range" header field is used in conjunction with the Range header to conditionally request parts of a representation.
If the validator given in the "If-Range" header matches the current validator for the representation, then the server should respond with the specified range of the document.
If they do not match, the server should return the entire representation.
Key points:
Modifier and Type | Field and Description |
---|---|
static RequestIfRange |
INSTANCE
Default instance of
RequestIfRange . |
Constructor and Description |
---|
RequestIfRange() |
Modifier and Type | Method and Description |
---|---|
void |
process(org.apache.hc.core5.http.HttpRequest request,
org.apache.hc.core5.http.EntityDetails entity,
org.apache.hc.core5.http.protocol.HttpContext context)
Processes the given request to ensure it adheres to the RFC guidelines for the 'If-Range' header.
|
public static final RequestIfRange INSTANCE
RequestIfRange
.public void process(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.EntityDetails entity, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException, IOException
process
in interface org.apache.hc.core5.http.HttpRequestInterceptor
request
- The HTTP request to be processed.entity
- The entity details of the request.context
- The HTTP context.org.apache.hc.core5.http.HttpException
- If the request does not adhere to the RFC guidelines.IOException
- If an I/O error occurs.Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.