mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Fix default body contenttype in InternetUtils.doJsonRequest
This commit is contained in:
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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user