I'm trying to get an api from www.mocky.io, the issue is, when the app starts I'm getting an error like
E/flutter ( 846): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: HandshakeException: Handshake error in client (OS Error:
E/flutter ( 846): CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(handshake.cc:354))
this is how I'm getting the response.
Future _fetchPost() async {
http.Response response = await http.get(url);
print(response.body);
setState(() {
var convertDatatoJson = json.decode(response.body);
debugPrint(convertDatatoJson.toString());
_data = convertDatatoJson['table_menu_list'];
});}
How can I verify the certificate for this api link for GET method?
I referred this issue, for POST method https://stackoverflow.com/a/54359013/11893608,
any other suggestions would be helpful