Skip to content

Commit 093486f

Browse files
authored
Merge pull request #438 from appwrite/fix-swift-async-download
Collect body bytes
2 parents a85a443 + 21f74b5 commit 093486f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/swift/Sources/Client.swift.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ open class Client {
285285
case is Bool.Type:
286286
return true as! T
287287
case is ByteBuffer.Type:
288-
return response.body as! T
288+
return try await response.body.collect(upTo: Int.max) as! T
289289
default:
290290
let data = try await response.body.collect(upTo: Int.max)
291291
if data.readableBytes == 0 {

0 commit comments

Comments
 (0)