Persisted file order options
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user