Angular2 http.post gets executed twice
<p>I came across a weird issue where the Angular2's (RC1) Http service executes the http.post call twice. I've debugged my app and I know for a fact this is not a click event issue. All the calls that lead up to the core service call</p>

<pre><code>public create(json: Object, params?: Object): Observable&lt;T&gt; {
    let body = JSON.stringify([json]);
    let headers = this.getHeaders();
    let options = new RequestOptions({ headers: headers });

    return this._http.post(this.createURL(this.getCreateURL(), [], params), body, options)
    .map(res =&gt; this.handleObjectResponse(res));
}
</code></pre>

<p>are run once. Then when I started tracing the issue I found out that my handler <code>this.handleObjectResponse</code> gets executed twice. So I delved further and reached <code>@angular/http/src/backends/xhr_backend.ts</code> where they do this</p>

<pre><code>constructor(req: Request, browserXHR: BrowserXhr, baseResponseOptions?: ResponseOptions) {
    this.request = req;
    this.response = new Observable&lt;Response&gt;((responseObserver: Observer&lt;Response&gt;) =&gt; {
        let _xhr: XMLHttpRequest = browserXHR.build();
        _xhr.open(RequestMethod[req.method].toUpperCase(), req.url);
        // load event handler
        ...
        ..
</code></pre>

<p>So I put a breakpoint on <code>this.request = req;</code> and then another breakpoint on <code>let _xhr: XMLHttpRequest = browserXHR.build();</code> and I found out I hit the first breakpoint once but then I hit the second breakpoint from the callback twice.</p>

<p>This has been driving me nuts so I wanted to check whether anyone familiar with the angular2 internals could shed some light whether this looks like a bug or something that I've done wrong.</p>

<p>In my code I've created some abstract generic service classes: GenericService and FullService which extends GenericService. Both of these are abstract and use generics and the real service classes that get injected in the different components all extend either GenericService or FullService. Do you guys think this setup could possibly be responsible for the double post executions?</p>

<p>All ideas are appreciated!</p>

<p>Thanks in advance!</p>

<p>P.S.</p>

<p>This doesn't happen with gets but it also happens with puts.</p>