In the docs for HttpClient
, there's a mention of HttpObserve
. However, when I Google for it, it seems (based on different blogs and forums) that it's been removed. It's definitely not present in Angular 9 (under @angular/common/http
, at least). Various sources provide different suggestions and I sense that there's more assuming than knowing in those.
According to e.g. this declaration there's something of type HttpObserve
supposed to be provided (or skipped, of course, which most people probably do). I've prepared the following sample.
const headers: HttpHeaders = new HttpHeaders();
const observe: HttpObserve = null;
const params: HttpParams = new HttpParams();
const reportProgress = false;
const responseType = "json";
const withCredentials = true;
VS Code marks the second line as incorrect as the type isn't recognized. I couldn't find a reliable, credible source of info on how to handle it, so I get cautious. There's also seemingly different responses depending on the version since 5th through 8th and not that many on the current 9th. Having time to research it in depth, I'm asking here.
What, if anything, should/could be provided as type for the observe
parameter?