title: How to listen HTTP response and apply preloader?
body: <p>I use HTTP library for executing request to server in my SPA like this:</p>
  
  <pre><code>public get(cls: number): Observable&lt;any[]&gt; {
  
      const data = {
  
      };
  
      return this.http.post(null, data)
        .map(result =&gt; {
          return result.json().result;
        })
        .catch(this.handleErrorObservable);
    }
  </code></pre>
  
  <p>Let's assume we have a preloader service, that is started when request leaves and stops when response comes.</p>
  
  <p>How to bind this service to HTTP? Exactly, I can subscribe on Observer response like:</p>
  
  <pre><code>preloader.start();
  get(1).subscribe(data =&gt; {}, error =&gt; {
     preloader.stop();
  });
  </code></pre>
  
  <p>But it is not fit for me, I want to make this more universal and more abstract</p>