When I called the rest API from postman it gives the actual result but when I do it from angular 6 it return every response as error.
        this.code=this.codeCollectorForm.value;
        let formData: FormData = new FormData();    
        formData.append('value', this.code.value);
        formData.append('input', this.code.input);
      this.httpclient.post("http://localhost:8000/onlineide/runcode",formData).subscribe(
       (data) => {
          $('#output').val("okk");
       }, error => {
          $('#output').val("Not okk");
        }
       );
Everything is accepted as error. Any solution please?. The error always shown is
Http failure response for http://localhost:8000/onlineide/runcode: 0 Unknown Error
enter code here
 
    