Closed kuhe closed 3 months ago
https://smithy.io/2.0/spec/behavior-traits.html#idempotencytoken-trait
Client implementations MAY automatically provide a value for a request token member if and only if the member is not explicitly provided.
This adds the automatic default token for headers. Previously added for query params in https://github.com/aws/aws-sdk-js-v3/pull/4272.
const headers: any = map({}, isSerializableHeaderValue, { "content-type": "application/json", [_xact]: input[_CT]!, });
import { v4 as generateIdempotencyToken } from "uuid"; const headers: any = map({}, isSerializableHeaderValue, { "content-type": "application/json", [_xact]: input[_CT] ?? generateIdempotencyToken(), });
https://smithy.io/2.0/spec/behavior-traits.html#idempotencytoken-trait
This adds the automatic default token for headers. Previously added for query params in https://github.com/aws/aws-sdk-js-v3/pull/4272.
before
after