Skip to content

Commit 21f74b5

Browse files
committed
Collect body bytes
1 parent 1224ecb commit 21f74b5

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
let dict = try JSONSerialization.jsonObject(with: data) as? [String: Any]

0 commit comments

Comments
 (0)