@@ -58,7 +58,7 @@ Future _apiRequest(String method, String path, dynamic data,
|
||||
r = await client.getUrl(Uri.parse('https://' + serverHost + path));
|
||||
}
|
||||
|
||||
r.headers.set('Content-Type', 'application/json');
|
||||
r.headers.set('Content-Type', 'application/json; charset=utf-8');
|
||||
if (tokens != null) {
|
||||
r.headers.set('Authorization', tokens.accessToken);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ suspend fun apiRequest(
|
||||
requestMethod = method
|
||||
doInput = true
|
||||
if (method == "POST" || method == "PUT" || method == "PATCH") {
|
||||
setRequestProperty("Content-Type", "application/json")
|
||||
setRequestProperty("Content-Type", "application/json; charset=utf-8")
|
||||
doOutput = true
|
||||
val data = when (body) {
|
||||
is String -> {
|
||||
|
||||
Reference in New Issue
Block a user