如何解决DioError [DioErrorType.other]: HttpException: 在收到完整标头之前关闭连接
我正在使用 dio: ^4.0.0 和 http: ^0.13.1 但是当我尝试上传带有数字列表的媒体时,当我上传没有数字列表的媒体时它不起作用
authToken 14196
[ +6 ms] I/flutter ( 9404): *** Request ***
[ ] I/flutter ( 9404): uri: http://18.106.205.245:8080/api/media
[ ] I/flutter ( 9404): headers:
[ ] I/flutter ( 9404): Authorization: Bearer 14196
[ ] I/flutter ( 9404): content-type: application/json
[ +3 ms] I/flutter ( 9404): data:
[ ] I/flutter ( 9404): Instance of 'FormData'
[ ] I/flutter ( 9404):
[ +46 ms] D/libc-netbsd( 9404): [getaddrinfo]: mtk hostname=18.106.205.245; servname=(null); netid=0; mark=0
[ ] D/libc-netbsd( 9404): [getaddrinfo]: mtk ai_addrlen=0; ai_canonname=(null); ai_flags=1024; ai_family=0
[+4802 ms] I/flutter ( 9404): *** DioError ***:
[ +6 ms] I/flutter ( 9404): uri: http://18.106.205.245:8080/api/media
[ +7 ms] I/flutter ( 9404): DioError [DioErrorType.other]: HttpException: Connection closed before full header was received,uri = http://18.106.205.245:8080/api/media
[ ] I/flutter ( 9404): #0 DioMixin.assureDioError (package:dio/src/dio_mixin.dart:819:20)
[ ] I/flutter ( 9404): #1 DioMixin._dispatchRequest (package:dio/src/dio_mixin.dart:678:13)
[ ] I/flutter ( 9404): <asynchronous suspension>
[ ] I/flutter ( 9404): #2 DioMixin.fetch.<anonymous closure>.<anonymous closure> (package:dio/src/dio_mixin.dart)
[ ] I/flutter ( 9404): <asynchronous suspension>
[ ] I/flutter ( 9404):
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。