Skip to content

Commit

Permalink
chore(middleware-flexible-checksums): use object for requestAlgorithm…
Browse files Browse the repository at this point in the history
…Member
  • Loading branch information
trivikr committed Nov 26, 2024
1 parent abe093d commit f7800dd
Showing 1 changed file with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,20 @@ export interface FlexibleChecksumsRequestMiddlewareConfig {
requestChecksumRequired: boolean;

/**
* Defines a top-level operation input member that is used to configure request checksum behavior.
* Member that is used to configure request checksum behavior.
*/
requestAlgorithmMember?: string;
requestAlgorithmMember?: {
/**
* Defines a top-level operation input member that is used to configure request checksum behavior.
*/
name: string;

/**
* The {@link httpHeader} value for {@link requestAlgorithmMember}, if present.
* {@link https://smithy.io/2.0/spec/http-bindings.html#httpheader-trait httpHeader}
*/
requestAlgorithmMemberHttpHeader?: string;
/**
* The {@link httpHeader} value, if present.
* {@link https://smithy.io/2.0/spec/http-bindings.html#httpheader-trait httpHeader}
*/
httpHeader?: string;
};
}

export const flexibleChecksumsMiddlewareOptions: BuildHandlerOptions = {
Expand Down Expand Up @@ -68,7 +73,7 @@ export const flexibleChecksumsMiddleware =
input,
{
requestChecksumRequired,
requestAlgorithmMember,
requestAlgorithmMember: requestAlgorithmMember?.name,
},
!!context.isS3ExpressBucket
);
Expand Down

0 comments on commit f7800dd

Please sign in to comment.