This is the Postman Screenshot by which I'm getting response successfully! And I want to fetch data in angular but the http.post() syntax issue occurs.
http.post()
const bodyCode = { seat_hell: "765", helloo: "1611255600" }; export class DashDataTable22Component implements OnInit { data =[]; constructor(private http:Http) { this.http.post('http://199.100.155.771/xyzza/', JSON.stringify(bodyCode)).subscribe( data =>{ this.data = data.json(); } ) }
Use bodyCode without stringify.
bodyCode
this.http.post('http://199.100.155.771/xyzza/', bodyCode) .subscribe(data => { this.data = data.json(); }
2.1m questions
2.1m answers
60 comments
57.0k users