Angular 2 http request with Access-Control-Allow-Origin set to *
<p>I'm using angular2 and typescript.</p>

<p>I'm trying to post to my mail chimp subscription list.</p>

<p><strong>My code so far:</strong></p>

<pre><code> constructor(router: Router, http: Http){   
      this.router = router;

      this.http = http; 
      this.headers = new Headers();
      this.headers.append('Content-Type', 'application/json');
      this.headers.append('Access-Control-Allow-Origin', '*');
  }

  subscribe = () =&gt; {
        var url = "https://thepoolcover.us10.list-manage.com/subscribe/post?u=b0c935d6f51c1f7aaf1edd8ff&amp;id=9d740459d3&amp;subscribe=Subscribe&amp;EMAIL=" + this.email;
        this.isSuccess = false;

        this.http.request(url, this.headers).subscribe(response =&gt; {
           console.log(response);
           this.isSuccess = true; 
        });   
  }
</code></pre>

<p>This is the error I get in my console:</p>

<p><a href="https://i.stack.imgur.com/VgGGX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/VgGGX.png" alt="enter image description here"></a> </p>

<p>I get this error now: Uncaught SyntaxError: Unexpected token &lt;</p>

<p><strong>Current code below:</strong></p>

<pre><code>export class Footer{
  email: string = "";
  router : Router;
  http : Http;
  jsonp: Jsonp;
  isSuccess: boolean = false;

  constructor(router: Router, jsonp: Jsonp, http: Http){   
      this.router = router;
      this.http = http; 
      this.jsonp = jsonp;
  }

  subscribe = () =&gt; {
        var url = "https://thepoolcover.us10.list-manage.com/subscribe/post?u=b0c935d6f51c1f7aaf1edd8ff&amp;id=9d740459d3&amp;subscribe=Subscribe&amp;EMAIL=" + this.email;
        this.isSuccess = false;

        this.jsonp.request(url).subscribe(response =&gt; {
           console.log(response);
           this.isSuccess = true; 
        });   
  }
</code></pre>