I am making an api call to node server. Its a post call but I am getting error as response but the data on firebase changes.
const header : HttpHeaders = new HttpHeaders()
header.append('Content-Type', 'application/x-www-form-urlencoded')
this.http.post('http://localhost:3000/s/getKey', { seqKey : 'invoices' }, {
headers : header
}).subscribe(data => {
console.log(data)
})
Update

I had the same problem. I was using the Spring REST API on the backend which was just returning a String, which was a problem because Angular HttpClient expects JSON. I solved it by wrapping my String in a simple POJO and returned that instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With