fix: update performLCERequest for LCEssentials 2.0.2 API.request signature

LCEssentials 2.0.2 replaced request(url:params:method:headers:jsonEncoding:debug:)
with request(url:method:body:pathParams:headers:debug:timeoutInterval:networkServiceType:persistConnection:).
The pre-encoded params Data is now wrapped in RawBody to preserve the same
application/json Content-Type behavior that jsonEncoding: true used to set.
This commit is contained in:
2026-09-11 09:02:17 -03:00
parent 1b08ecb56e
commit a5827f9136

View File

@@ -175,12 +175,12 @@ extension ApiClient {
headers: [String: String]
) async throws -> String {
let httpMethod = toHTTPMethod(method)
let body: (any HTTPBody)? = params.map { RawBody(data: $0, contentType: "application/json; charset=UTF-8") }
return try await API.shared.request(
url: url,
params: params,
method: httpMethod,
body: body,
headers: headers,
jsonEncoding: true,
debug: true
)
}