I'm trying to make an HTTP POST call in the following way:
`const headers = new Headers();
const payload = [
{
....
},
{
....
}
];
this.httpClient.post(url, payload).subscribe((data) => {
console.log('Success', data);
});`
but, the above is giving me this error (screenshot attached)
and when I checked the console, the call was never made. I think I'm missing something with the post call that is throwing an error even before the call is made. Any thoughts?
UPDATE: the api works totally fine when tested with Postman, i.e., I tried making a POST call and added a body and it works just fine.