improve & correct the type declarations for BLOB (aws/smithy) types #4786
Labels
feature-request
New feature or enhancement. May require GitHub community feedback.
p2
This is a standard priority issue
Describe the feature
shape members with type BLOB are treated too narrowly, being declared in the base request/response types as
Uint8Array
.Example, Lambda's InvokeCommand's InvocationRequest.Payload.
Depending on the request handler (commonly node.http or fetch), this payload is passed with no modification as the request body. These native http implementations accept multiple types for their request bodies including string and other streaming formats.
Use Case
The type is too narrow and can confuse TypeScript users into thinking they need to convert their already-acceptable payloads, such as strings, into a Uint8Array before sending them over the SDK request.
Proposed Solution
expand the type declaration for BLOB types in client models to include accepted request body types in the environment's default request handler.
This should at the very least include strings.
Other Information
No response
Acknowledgements
SDK version used
current
Environment details (OS name and version, etc.)
all
The text was updated successfully, but these errors were encountered: