Skip to content

Instantly share code, notes, and snippets.

@maxkoretskyi
Created December 21, 2017 11:05
Show Gist options
  • Save maxkoretskyi/985197beefa304acfdbe479671e88439 to your computer and use it in GitHub Desktop.
Save maxkoretskyi/985197beefa304acfdbe479671e88439 to your computer and use it in GitHub Desktop.
export class AppComponent {
response: Observable<any>;
constructor(private backend: HttpXhrBackend) {}
request() {
const req = new HttpRequest('GET', 'https://jsonplaceholder.typicode.com/posts/1');
const handler = new HttpInterceptorHandler(this.backend, new I1());
this.response = handler.handle(req);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment