title: Angular2 http request in an interval
body: <p>I m trying to make a request every 3 seconds and print out the response but until now no luck :( . I m pretty new to the <code>Observables</code>, so what am I doing wrong ?</p>
  
  <pre><code>checkConnection() {
  
  const URL = "https://www.google.at/";
  
  Observable.interval(3000)
    .flatMap(() =&gt; this.http.get(URL).map(res =&gt; res.json()).catch((error:any) =&gt; Observable.throw(error.json().error || 'Server error'))
    .subscribe(data =&gt; {
       console.log(data)
    })
  
    )
      }
  </code></pre>