title: json-server getting error after post request
body: <p>I am working with json-server and I am getting following error. What I am doing wrong?</p>
  
  <blockquote>
    <p>TypeError: Cannot read property 'id' of undefined [0]     at
    Function.createId
    (/Users/Picchu/Documents/url/node_modules/json-server/lib/server/mixins.js:47:39)
    [0]     at Function.insert
    (/Users/Picchu/Documents/url/node_modules/lodash-id/src/index.js:47:49)
    [0]     at
    /Users/Picchu/Documents/url/node_modules/lodash/lodash.js:4388:28
    [0]     at arrayReduce
    (/Users/Picchu/Documents/url/node_modules/lodash/lodash.js:683:21)
    [0]     at baseWrapperValue
    (/Users/Picchu/Documents/url/node_modules/lodash/lodash.js:4387:14)</p>
  </blockquote>
  
  <pre><code>  createShortUrl(data: ShortUrl): Observable&lt;any&gt; {
      let params = new HttpParams();
      params = params.append('url', 'http://google.com');
      return this._http.post(`${'/api'}`, { params: params }).pipe(map((res) =&gt; {
        return res;
    }
  </code></pre>