dio icon indicating copy to clipboard operation
dio copied to clipboard

cannot request download with DioMixin

Open zae1403 opened this issue 3 years ago • 0 comments

New Issue Checklist

  • [x] I have searched for a similar issue in the project and found none

Issue Info

Info Value
Platform Name e.g. flutter / ios / android
Platform Version e.g. 1.5.0 / 12.0 / 9.0
Dio Version e.g. 2.1.0 / 1.0.17
Android Studio / Xcode Version e.g. Android Studio 3.3.2 / Xcode 10.2.1
Repro rate e.g. all the time (100%) / sometimes x% / only once
Repro with our demo prj e.g. does it happen with our demo project?
Demo project link e.g. link to a demo project that highlights the issue

Issue Description and Steps

step to reproduce

class DioClient with DioMixin implements Dio { DioClient() { options = BaseOptions( baseUrl: Strings.baseURL, connectTimeout: 15000, sendTimeout: 15000, receiveTimeout: 15000, contentType: Headers.formUrlEncodedContentType, );

interceptors.addAll([ LoggingInterceptor(), HeaderInterceptor(), ]);

httpClientAdapter = DefaultHttpClientAdapter();

} }

in src/dio_mixin.dart:335

@override Future<Response> download( String urlPath, savePath, { ProgressCallback? onReceiveProgress, Map<String, dynamic>? queryParameters, CancelToken? cancelToken, bool deleteOnError = true, String lengthHeader = Headers.contentLengthHeader, data, Options? options, }) async { throw UnsupportedError('Unsupport download API in browser'); }

zae1403 avatar Feb 21 '22 05:02 zae1403