I am sending a post request in Dart It is giving a response when I test it on API testing tools such as Postman. But when I run the app. It gives me the following error:-
Here is my code of the function -
var request =
http.MultipartRequest('POST', Uri.parse('https://myurl/files/'));
request.files.add(await http.MultipartFile.fromPath('file', pathfile));
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
} else {
print(response.reasonPhrase);
}
error
E/flutter ( 6264): HandshakeException: Handshake error in client (OS Error: E/flutter ( 6264): CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(handshake.cc:363))