FlexibleChecksumsResponseInterceptor
open class FlexibleChecksumsResponseInterceptor(responseValidationRequired: Boolean, responseChecksumValidation: <Error class: unknown class>?)
Handles response checksums.
If it's a streaming response, it wraps the response in a hashing body, calculating the checksum as the response is streamed to the user. The checksum is validated after the user has consumed the entire body using a checksum validating body. Otherwise, the checksum if calculated all at once.
Users can check which checksum was validated by referencing the ResponseChecksumValidated
execution context variable.
Parameters
responseValidationRequired
Model sourced flag indicating if the checksum validation is mandatory.
responseChecksumValidation
Configuration option that determines when checksum validation should be done.
Constructors
Link copied to clipboard
constructor(responseValidationRequired: Boolean, responseChecksumValidation: <Error class: unknown class>?)
Functions
Link copied to clipboard
open fun ignoreChecksum(checksum: String, context: <Error class: unknown class><Any, <Error class: unknown class>, <Error class: unknown class>>): Boolean
Additional check on the checksum itself to see if it should be validated
Link copied to clipboard
open suspend fun modifyBeforeDeserialization(context: <Error class: unknown class><Any, <Error class: unknown class>, <Error class: unknown class>>): <Error class: unknown class>