I want to read my local data into stackblitz project. I have the file to the project and here is the code that trying: ngOnInit() { this.getFileData() .subscribe(response => console.log(response)); } getFileData() { return this.http.get('data.txt') .pipe( switchMap((response: any) => this.http.get(response.pathToFile, { responseType: 'text' })) ); } In the project's console I am getting this: What am I doing wrong? Continue reading...