I'm trying to do a simple post to a server that implement https:
constructor(private http: HTTP) { }
this.http.post('https://server/someEndpoint', {}, {'Content-Type':'application/json'})
.then(data => {
alert(data);
})
.catch(error => {
console.log(error.status);
console.log(error); // error message as string
console.log(error.headers);
});
Unfortunately I receive the following error “TLS connection could not be established: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.”
I found only one thread getting this error but I don't understand what should I do to fix this error.
Someone can give me some instruction to make a post to a https resource?
thanks