diff --git a/src/main/java/com/infomaniak/lib/core/api/ApiController.kt b/src/main/java/com/infomaniak/lib/core/api/ApiController.kt index 73f1143d..b8da40ba 100644 --- a/src/main/java/com/infomaniak/lib/core/api/ApiController.kt +++ b/src/main/java/com/infomaniak/lib/core/api/ApiController.kt @@ -87,7 +87,7 @@ object ApiController { fun generateRequestBody(body: Any?): RequestBody { val jsonMediaType = "application/json; charset=utf-8".toMediaTypeOrNull() val toJson = when (body) { - is JsonElement -> body.toString() + is JsonElement, is com.google.gson.JsonElement -> body.toString() is String -> body else -> gson.toJson(body) }