Skip to content

Commit

Permalink
Increase maximum response data size in APIHandler to 100MB for improv…
Browse files Browse the repository at this point in the history
…ed data handling during downloads.
  • Loading branch information
vamsii777 committed Dec 19, 2024
1 parent df011da commit e982916
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/JuspayKit/Core/APIHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ actor JuspayAPIHandler {
request.body = body

let response = try await httpClient.execute(request, timeout: .seconds(60))
let responseData = try await response.body.collect(upTo: .max)
let responseData = try await response.body.collect(upTo: 1024 * 1024 * 100) // 500mb to account for data downloads.

guard response.status == .ok else {
let error = try decoder.decode(JuspayError.self, from: responseData)
Expand Down

0 comments on commit e982916

Please sign in to comment.