getFileInBytes static method

Future<Response> getFileInBytes(
  1. String endpoint, {
  2. dynamic data,
  3. Map<String, dynamic>? queryParams,
})

Implementation

static Future<Response> getFileInBytes(String endpoint,
    {dynamic data, Map<String, dynamic>? queryParams}) async {
  try {
    final response = await GetIt.I<ApiClient>().client
        .post(endpoint, data: data, queryParameters: queryParams,options: Options(responseType: ResponseType.bytes));
    return response;
  } catch (e) {
    print('Error in POST request: $e');
    rethrow;
  }
}