title: Angular2 - Using POST with angular-in-memory-web-api
body: <p>I am playing around with angular-in-memory-web-api for Angular 2. So far I have only been using GET calls and it's working well.</p>
  
  <p>The API I'm going to call is only using POST calls so I began rewriting my GET calls to POST calls, but then they stopped returning the mock data. In my test function bellow, I want to get the data as a TestResponse object by an id:</p>
  
  <pre><code>postTest(id: string): Promise&lt;TestResponse&gt; {
      return this.http
          .post(this.testUrl, JSON.stringify({ testId: id }), { headers: this.headers })
          .toPromise()
          .then(response =&gt; response.json().data as TestResponse)
          .catch(this.handleError);
  }
  </code></pre>
  
  <p>And the mock data:</p>
  
  <pre><code>    let test = [
          { testId: 'e0d05d2b-3ec3-42ae-93bc-9937a665c4d6', missingData: 'qwerty', moreMissingData: 'asdfgh' },
          { testId: 'dccef969-b9cf-410a-9973-77549ec47777', missingData: 'qwerty', moreMissingData: 'asdfgh' },
          { testId: '20716fd7-1f50-4a12-af16-52c009bc42ab', missingData: 'qwerty', moreMissingData: 'asdfgh' }
      ];
  </code></pre>
  
  <p>If I understand this right, this code will assume that I want to create something and is therefor bouncing my testId back together with id: 1 (which doesn't even follow my data structure).</p>
  
  <p>So, my question is, how can I get my mock data with POST calls?</p>