Skip to content

Custom DynamoDB response deserialization #1045

Answered by rcoh
simonvandel asked this question in Q&A
Discussion options

You must be logged in to vote

yep! if you look at body.bytes() docs it's only bytes if it's in memory already. You should use response.body.take() to take the body. Then outside of this context, use body.collect().await to consume the contents.

The other option might be to use an override to set your own deserializer which would allow you to grab the body before it had been read.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@rcoh
Comment options

rcoh Jan 16, 2024
Collaborator

@simonvandel
Comment options

@simonvandel
Comment options

@rcoh
Comment options

rcoh Jan 17, 2024
Collaborator

Answer selected by jmklix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants