Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

write method not work #30

Open
springeye opened this issue May 31, 2023 · 2 comments
Open

write method not work #30

springeye opened this issue May 31, 2023 · 2 comments

Comments

@springeye
Copy link

call write is error
code is :

    var map = box.toMap();
    client.write("backup-${DateTime.now().millisecondsSinceEpoch}",
        Uint8List.fromList(jsonEncode(map).codeUnits));dart

error is :

[馃敂 Dio] _MultiStream<List<int>> cannot be used to imply a default content-type, please set a proper content-type in the request.
         #0      ImplyContentTypeInterceptor.onRequest (package:dio/src/interceptors/imply_content_type.dart:45:36)
         #1      DioMixin.fetch.requestInterceptorWrapper.<anonymous closure>.<anonymous closure> (package:dio/src/dio_mixin.dart:409:26)
         #2      new Future.<anonymous closure> (dart:async/future.dart:256:37)
         #3      Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
         #4      _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
         #5      _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
         #6      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)
@mostcute
Copy link

client.write("syncdata.json", Uint8List.fromList(jsonString.codeUnits));
sameproblem

[馃敂 Dio] _MultiStream<List<int>> cannot be used to imply a default content-type, please set a proper content-type in the request.
         #0      ImplyContentTypeInterceptor.onRequest (package:dio/src/interceptors/imply_content_type.dart:45:36)
         #1      DioMixin.fetch.requestInterceptorWrapper.<anonymous closure>.<anonymous closure> (package:dio/src/dio_mixin.dart:409:26)
         #2      new Future.<anonymous closure> (dart:async/future.dart:256:37)
         #3      Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
         #4      _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
         #5      _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
         #6      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)

@szuwest
Copy link

szuwest commented Jul 16, 2023

client.write("syncdata.json", Uint8List.fromList(jsonString.codeUnits)); sameproblem

[馃敂 Dio] _MultiStream<List<int>> cannot be used to imply a default content-type, please set a proper content-type in the request.
         #0      ImplyContentTypeInterceptor.onRequest (package:dio/src/interceptors/imply_content_type.dart:45:36)
         #1      DioMixin.fetch.requestInterceptorWrapper.<anonymous closure>.<anonymous closure> (package:dio/src/dio_mixin.dart:409:26)
         #2      new Future.<anonymous closure> (dart:async/future.dart:256:37)
         #3      Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
         #4      _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
         #5      _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
         #6      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)

has the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants