skip to Main Content

Angular: I keep on getting error 400: bad request "One or more validation error occured" when using httpPost – Asp.net

Service.ts addTankValues(data:any) { return this.http.post(this.TankApiUrl + "...", data).pipe( tap(()=>{ this.RefreshRequired.next(); }) ); } Subscribing to the httpPost: SaveTV(){ if(this.TVForm.valid){ console.log(this.TVForm.value); this.service.addTankValues(this.TVForm.value).subscribe(result=>{ this.TVFormresp=result; console.log(this.TVFormresp); this.alert = true; this.TVForm.reset(); }); }else{ console.log("form not valid"); } I keep on getting 400 error: bad…

VIEW QUESTION
Back To Top
Search