Type “json” | undefined not satisfied by “json” in Angular HttpClient
问题 I'm scrutinizing the docs for HttpClient, focusing on the get(...) method. 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; const options = { headers, observe, params, reportProgress, responseType, withCredentials }; this.http.get(url, options) I get an error stating the following. No