Created
February 24, 2019 15:59
-
-
Save felipecesr/eb05eccca3d8910c3ae79563bc7d2fab to your computer and use it in GitHub Desktop.
This file contains 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 PostsManager { | |
constructor(http) { | |
this.http = http; | |
} | |
getPosts() { | |
return this.http.get('https://jsonplaceholder.typicode.com/posts'); | |
} | |
getComments() { | |
return this.http.get('https://jsonplaceholder.typicode.com/comments'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment