i was building a flutter application and i need to get JSON data from a https server.
but i getting error like this
Error: HandshakeException: handshake error in client(OS ERROR: CERTIFICATE_VERIFIY_FAILED: self signed certificate
My ApiServices Code
class ApiAjuService{
Client client = Client();
final baseURL = "https://posdemo.sisapp.com:8443/kbs/rest/mock/api/ajus";
Future<List<Aju>> getAju() async{
final response = await client.get("$baseURL");
if(response.statusCode == 200){
return ajuFromJson(response.body);
}else{
return null;
}
}
My Model
List<Aju> ajuFromJson(String jsonData) {
final data = json.decode(jsonData);
return List<Aju>.from(data.map((item) => Aju.fromJson(item)));
}
i except the api will show in my listView , but i still get error handshake