I have an issue because err is returning a string instead of a HttpResponse. I am not sure why, the server returns the content type as "application/json".
Version of Angular is 13.
return this.http.delete(
"http://Localhost:8080/delete",
{ headers: { 'Content-Type': 'application/json' } }
).pipe(
catchError((err, caught) => {
return of(false);
}),
map(() => {
return true;
})
)
I am not sure why doesn’t work