Skip to content

Instantly share code, notes, and snippets.

@davidecavaliere
Last active January 15, 2020 17:05
Show Gist options
  • Save davidecavaliere/5648a35295397774035a955d2e954e3f to your computer and use it in GitHub Desktop.
Save davidecavaliere/5648a35295397774035a955d2e954e3f to your computer and use it in GitHub Desktop.
@Injectable()
export class UserService {
constructor(private _client: HttpClient) {}
@Cache({
ttl: 2500
})
public findAll(id): Observable<any> {
return this._client.get(`https://reqres.in/api/users?page=${id}`)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment