Skip to content

Commit

Permalink
Fix "Stream must be replayable to calculate a body hash" error
Browse files Browse the repository at this point in the history
  • Loading branch information
lauzadis committed Jul 9, 2024
1 parent 6791e40 commit 764fea6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class CborSerializer :
StructSerializer {
private val buffer = SdkBuffer()

public fun toHttpBody(): HttpBody = buffer.toHttpBody(contentLength = buffer.size)
public fun toHttpBody(): HttpBody = buffer.readByteArray().toHttpBody()

override fun toByteArray(): ByteArray = buffer.readByteArray()

Expand Down

0 comments on commit 764fea6

Please sign in to comment.