0
 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);
   
   
  }
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • 1
    Does this answer your question? [HttpClient cannot ignore or bypass self signed certificate error](https://stackoverflow.com/questions/54840830/httpclient-cannot-ignore-or-bypass-self-signed-certificate-error) – Erik Philips Jul 25 '22 at 15:51

1 Answers1

0

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.

LizardKing
  • 316
  • 2
  • 17