Persisted file order options

This commit is contained in:
MineTec committed 2023-06-19 14:13:56 +02:00
1 parent 53f1cdcda5
commit 28c98de9a7
5 files changed
+31 -3

No files matched your search

+6 -2
View File
@@ -38,8 +38,12 @@ abstract class TalkApi<T> extends ApiRequest {
headers?.putIfAbsent("Accept", () => "application/json");
headers?.putIfAbsent("OCS-APIRequest", () => "true");
http.Response? data = await request(endpoint, body, headers);
if(data == null) {
http.Response? data;
try {
data = await request(endpoint, body, headers);
if(data == null) throw Exception();
} catch(e) {
throw ApiError("Request could not be dispatched!");
}
//dynamic jsonData = jsonDecode(data.body);