title: How to mock HTTP Request in Angular?
body: <p>I have checked a lot of articles and answers but I don't seem to find the right way to mock <code>HTTP Requests</code> for my methods. I want to test my <code>frontend</code> application independently from the <code>backend</code>. Here is the type of methods I have:</p>
  
  <pre><code> private getProfile() {
      this.http
        .get('go/profile/get', {withCredentials: true})
        .subscribe((profile: Profile) =&gt; {
          this.user.profile = profile;
          this.updateLineMsgs();
        });
    }
  </code></pre>
  
  <p>Any suggestions ?</p>