admin管理员组文章数量:1314471
I am getting the HandshakeException: Connection terminated during handshake on Testflight on my Flutter app and also on Android phone, it shows for some users, for others don't, it is also sometimes not always which makes it more difficult. I have test some of the answers from similar questions here on stack overflow like HttpOverrides.global = MyHttpOverrides(); It didn't work. Here is the code use to connect with the server:
Future<Map> postingHeader(String endPoint, Map<String, dynamic> map) async{
var client = new http.Client();
try {
Map<String, String> headers = {
"Content-Type": "application/x-www-form-urlencoded",
"Accept": "application/x-www-form-urlencoded",
"Access-Control-Allow-Origin": "*"};
final response1 =await http.head(Uri.parse(endPoint));
http.Response response = await client.post(
Uri.parse(endPoint),
headers: headers,
body: map,
);
Map<String, dynamic> rest = json.decode(response.body);
return rest;
} finally{
client.close();
}
}
I have flutter 3.26.0-1.0 version, just mentioning as I saw that that was an issue in some old version on github forum. And also http plugin version: 0.13.5. Off course to test the HttpClient Override I switch to dart:io, but it was the same issue. Does anybody knows what the problem could be? Or if it is the server, but as I say it works sometimes Thank you
本文标签: dartFlutter HandshakeException Connection terminated during handshake on TestFlightStack Overflow
版权声明:本文标题:dart - Flutter HandshakeException: Connection terminated during handshake on TestFlight - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741963243a2407402.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论