private baseUrl = 'https://diallosuer:8443/sprintproject';
submitForm(form: FormGroup) : Observable<HttpEvent<any>> {
let dataJson = JSON.stringify(form.value);
const httpOptions = {
headers: new HttpHeaders({'Content-Type': 'application/json',
"rejectUnauthorized": 'false',
}),
}
const req = new HttpRequest('POST', `${this.baseUrl}/adduser`, dataJson,httpOptions);
return this.httpClient.request(req);
}
-
1Does this answer your question? HttpClient cannot ignore or bypass self signed certificate errorErik Philips– Erik Philips2022-07-25 15:51:16 +00:00Commented Jul 25, 2022 at 15:51
Add a comment
|
1 Answer
You can't, your ssl certificate is invalid. You can skip ssl by using http instead of https but that would not be an actual fix.
3 Comments
Alimou DIALLO
when i use http, i got error certificate
Alimou DIALLO
after using http i got this error net::ERR_SSL_PROTOCOL_ERROR
Antoniossss
Obviously. Server is serving handshake on this port, you cannot just ignore ssl layer .