Created
December 21, 2017 10:17
-
-
Save maxkoretskyi/610cd76b5987d56d5a768ed1070c4ce8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class AppComponent { | |
response: Observable<any>; | |
constructor(private http: HttpClient) {} | |
request() { | |
const url = 'https://jsonplaceholder.typicode.com/posts/1'; | |
this.response = this.http.get(url, {observe: 'body'}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment