Created
December 21, 2017 09:41
-
-
Save maxkoretskyi/20d5bc2e0469e10aa7048c140699ed86 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 backend: HttpXhrBackend) {} | |
request() { | |
const req = new HttpRequest('GET', 'https://jsonplaceholder.typicode.com/posts/1'); | |
this.response = this.backend.handle(req); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment