public class HttpChecksumRequiredInterceptor extends Object implements ExecutionInterceptor
This is NOT supported for asynchronous HTTP content, which is currently only used for streaming upload operations. If such operations are added in the future, we'll have to find a way to support them in a non-blocking manner. That will likely require interface changes of some sort, because it's not currently possible to do a non-blocking update to request headers.
| Constructor and Description |
|---|
HttpChecksumRequiredInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
SdkHttpRequest |
modifyHttpRequest(Context.ModifyHttpRequest context,
ExecutionAttributes executionAttributes)
Calculates the MD5 checksum of the provided request (and base64 encodes it), and adds the header to the request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterExecution, afterMarshalling, afterTransmission, afterUnmarshalling, beforeExecution, beforeMarshalling, beforeTransmission, beforeUnmarshalling, modifyAsyncHttpContent, modifyAsyncHttpResponseContent, modifyException, modifyHttpContent, modifyHttpResponse, modifyHttpResponseContent, modifyRequest, modifyResponse, onExecutionFailurepublic SdkHttpRequest modifyHttpRequest(Context.ModifyHttpRequest context, ExecutionAttributes executionAttributes)
Note: This assumes that the content stream provider can create multiple new streams. If it only supports one (e.g. with an input stream that doesn't support mark/reset), we could consider buffering the content in memory here and updating the request body to use that buffered content. We obviously don't want to do that for giant streams, so we haven't opted to do that yet.
modifyHttpRequest in interface ExecutionInterceptorcontext - The current state of the execution, including the SDK and current HTTP request.executionAttributes - A mutable set of attributes scoped to one specific request/response cycle that can be used to
give data to future lifecycle methods.Copyright © 2023. All rights reserved.