bug fix on batches for zesa

This commit is contained in:
Prince
2026-06-21 00:24:36 +02:00
parent 381b5fbf08
commit b90d95bc63
11 changed files with 389 additions and 40 deletions

View File

@@ -45,6 +45,31 @@ class Http {
return response.data;
}
/// Returns the raw [Response] object (including status code)
/// instead of just the response body.
Future<Response> getRaw(String url) async {
Map<String, String> headers = await getHeaders();
final response = await dio.get(
baseUrl + url,
options: Options(headers: headers),
);
logger.i(response.data.toString());
return response;
}
/// Issues a POST request without authentication headers and returns
/// the raw [Response] object.
Future<Response> postRaw(String url, {dynamic data}) async {
final response = await dio.post(
baseUrl + url,
data: data,
options: Options(headers: {'Content-Type': 'application/json'}),
);
logger.i(response.data.toString());
return response;
}
Future<dynamic> post(String url, dynamic data) async {
Map<String, String> headers = {'Content-Type': 'application/json'};