Skip to content

Instantly share code, notes, and snippets.

@felipecesr
Created February 24, 2019 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felipecesr/eb05eccca3d8910c3ae79563bc7d2fab to your computer and use it in GitHub Desktop.
Save felipecesr/eb05eccca3d8910c3ae79563bc7d2fab to your computer and use it in GitHub Desktop.
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