bug fix on batches for zesa
This commit is contained in:
@@ -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'};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user