swagger editor generating typescript client that will not POST
<p>I have generated an Angular2 typescript client with the Swagger Editor located at <a href="http://editor.swagger.io/#/" rel="nofollow">http://editor.swagger.io</a>. The API works fine with all api endpoints that are not of type <code>POST</code>, although POST endpoints never get sent to the server.</p>

<p>The following method in the generated typescript is reached, and the <code>console.log</code> statement shows that the headers are being set, although nothing actually POSTs to the server.</p>

<p>This suggests that there is something wrong with the <code>this.http.request</code> call.</p>

<pre><code>public snapshotsFoo (data: Array&lt;number&gt;, extraHttpRequestParams?: any ) : Observable&lt;models.Snapshot&gt; {
    const path = this.basePath + '/Snapshots/foo';

    let queryParameters = new URLSearchParams();
    let headerParams = this.defaultHeaders;
    headerParams.set("Content-Type", "application/json");
    // verify required parameter 'data' is not null or undefined
    if (data === null || data === undefined) {
        throw new Error('Required parameter data was null or undefined when calling snapshotsFoo.');
    }
    let requestOptions: RequestOptionsArgs = {
        method: 'POST',
        headers: headerParams,
        search: queryParameters
    };
    requestOptions.body = JSON.stringify(data);

    console.log('I am in foo', path, requestOptions);

    return this.http.request(path, requestOptions)
        .map((response: Response) =&gt; {
            if (response.status === 204) {
                return undefined;
            } else {
                return response.json();
            }
        });
}
</code></pre>

<p>I can successfully use the endpoint from the swagger ui (<a href="http://0.0.0.0:5000/api/ui" rel="nofollow">http://0.0.0.0:5000/api/ui</a>), from POSTman, and from the command line with <code>$ curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '[7,7,8]' 'http://0.0.0.0:5000/api/Snapshots/foo'</code></p>

<p>Although, when I try to reach this endpoint using the generated typescript, nothing is posted to the server and no errors are thrown.</p>