postBytes method
Implementation
Future<List<int>> postBytes(
String endpoint, {
required Map<String, dynamic> data,
}) async {
try {
final response = await _dio.post<List<int>>(
endpoint,
data: jsonEncode(data),
options: Options(
responseType: ResponseType.bytes,
),
);
return response.data!;
} on DioException catch (e) {
throw Exception(_handleError(e));
}
}