We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1224ecb commit 21f74b5Copy full SHA for 21f74b5
templates/swift/Sources/Client.swift.twig
@@ -285,7 +285,7 @@ open class Client {
285
case is Bool.Type:
286
return true as! T
287
case is ByteBuffer.Type:
288
- return response.body as! T
+ return try await response.body.collect(upTo: Int.max) as! T
289
default:
290
let data = try await response.body.collect(upTo: Int.max)
291
let dict = try JSONSerialization.jsonObject(with: data) as? [String: Any]
0 commit comments