Fix default body contenttype in InternetUtils.doJsonRequest

This commit is contained in:
Arjan Schrijver
2025-12-25 14:45:08 +01:00
committed by Arjan Schrijver
parent 82fe173706
commit 7eddd36d45
@@ -78,7 +78,7 @@ class InternetUtils {
method: String = "GET",
requestHeaders: Map<String, String> = emptyMap(),
body: String? = null,
bodyContentType: String = "text/plain",
bodyContentType: String = "application/json",
allowInsecure: Boolean = false
): JSONObject? {
val text = doStringRequest(
@@ -92,6 +92,7 @@ class InternetUtils {
try {
return JSONObject(text)
} catch (e: Exception) {
LOG.error("Error while parsing JSON response", e)
return null
}
}