FlexibleChecksumsRequestInterceptor

class FlexibleChecksumsRequestInterceptor<I>(checksumAlgorithmNameInitializer: (I) -> String?? = null) : AbstractChecksumInterceptor

Mutate a request to enable flexible checksums.

If the checksum will be sent as a header, calculate the checksum.

Otherwise, if it will be sent as a trailing header, calculate the checksum as asynchronously as the body is streamed. In this case, a LazyAsyncValue will be added to the execution context which allows the trailing checksum to be sent after the entire body has been streamed.

Parameters

checksumAlgorithmNameInitializer

an optional function which parses the input I to return the checksum algorithm name. if not set, then the HttpOperationContext.ChecksumAlgorithm execution context attribute will be used.

Constructors

Link copied to clipboard
constructor(checksumAlgorithmNameInitializer: (I) -> String?? = null)

Functions

Link copied to clipboard
open override fun applyChecksum(context: <Error class: unknown class><Any, <Error class: unknown class>>, checksum: String): <Error class: unknown class>
Link copied to clipboard
open suspend override fun calculateChecksum(context: <Error class: unknown class><Any, <Error class: unknown class>>): String?
Link copied to clipboard
open suspend override fun modifyBeforeSigning(context: <Error class: unknown class><Any, <Error class: unknown class>>): <Error class: unknown class>
Link copied to clipboard
open fun readAfterSerialization(context: <Error class: unknown class><Any, <Error class: unknown class>>)