-
Notifications
You must be signed in to change notification settings - Fork 16
Handshake error #11
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You can provide your own |
Hi ! though this issue is closed, you might be familiar enough with the subject to guide me? I have had the same problem basically, I tried creating a HttpClient (from the same package as mentioned above), I tried passing client.post to the httpPost argument of xml_rpc's call function. It seems that they expect different types of return types , both Future but HttpResponse vs HttpClientRequest . So I have no idea where to start with providing my own httpPost here (I was hoping to pass in the dart.io package's HttpClient Here's an old solution only mentioning the http package : Though I do not know either how to set this one up. So, can httpPost actually reference a post function from the dart:io 's HttpClient - or is there a clear more obvious way I'm missing for xml_rpc to use the dart:io's http stuff either directly or indirectly just so the certificates are ignored. Thank you in advance for any kind of tips or information that could guide me further, even if it is to actually modify the contents of the packages themselves on my local copy - I won't mind at this point. |
So the following code should work (not tested and only where import 'dart:io' as io;
import 'package:http/http.dart' as http;
final ioClient = io.HttpClient()
..badCertificateCallback = ((X509Certificate cert, String host, int port) => true);
final httpPost = http.IOClient(ioClient).post;
xml_rpc.call(url, methodName, params, httpPost: httpPost); |
thank you! It appears to work fine now after testing! The slight difference to your code is that IOClient seems to have been seperated from the http package for some reason ? Anyway I found that importing http/io_client.dart fixed that issue instead of the full http package import 'dart:io' as io;
import 'package:http/io_client.dart';
final ioClient = io.HttpClient()
..badCertificateCallback = ((io.X509Certificate cert, String host, int port) => true);
final httpPost = IOClient(ioClient).post;
//then use httpPost as httpPost in xml_rpc.call( ... |
Hello,
When making a xml_rpc call on Android I got:
I added Android Internet permission https://flutter.dev/docs/development/data-and-backend/networking#android but without luck.
It seems this is a common issue, a way to resolve this is:
Is there a way to give this client to xml_rpc plugin?
The text was updated successfully, but these errors were encountered: