What is the best way to handle a plain text server response in Angular 2?
Currently, I have this implementation:
this.http.get('lib/respApiTest.res')
.subscribe(testReadme => this.testReadme = testReadme);
The content of lib/respApiTest.res file is as follows:
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
However, the response that I am receiving is in JSON format:
{"_body":"Lorem ipsum dolor sit amet......"}
To access the text data, I am currently using something like: (this.testReadme._boby)
alert(this.testReadme._boby);
Although this solution works fine, I am wondering if there is a better approach to handling plain text responses in Angular 2.