Angular 2/Web Api - json parsing error syntax error unexpected end of input
<p>I have a Web API controller that looks like this: </p>

<pre><code>    [HttpPost]
    public IHttpActionResult Test()
    {
        return Ok();
    }
</code></pre>

<p>This is correct syntax, However when I try to call this from a service in Angular 2, I get the error message: "json parsing error syntax error unexpected end of input." To resolve this issue, I have to put a value into the ActionResult such as </p>

<pre><code>return Ok(1)
</code></pre>

<p>Am I missing some configuration? My Angular 2 service call looks like this: </p>

<pre><code>return this.http.post(API/Controller/Test).map(res =&gt; res.json());
</code></pre>