title: How to return different mock based on different params?
body: <p>I have an api call with param:</p>
  
  <pre><code> public getPersonName(id: number): Observable&lt;Person&gt; {
      let searchParams: URLSearchParams = new URLSearchParams();
      searchParams.append("id", id.toString());
      // my http call is down here ...
    }
  </code></pre>
  
  <p>and my mock looks like this:</p>
  
  <pre><code>    public handleRequest(connection: MockConnection): void {
  
      let request: Request = connection.request;
  
      // Used in Expedite
     if (request.method === RequestMethod.Get &amp;&amp; new RegExp('\/person').test(request.url)) {
        setTimeout(() =&gt; {
          connection.mockRespond(new Response(
            new ResponseOptions({
              status: 200,
              headers: new Headers(MY_HEADERS),
              body: {
                "fname": "John",
                "lname": "Deer",
                "age": 25
              }
            })
          ));
        }, 1000);
      }
    }
  </code></pre>
  
  <p>but what I want is actually to return a different json according to the id...so if id is 5325 I want to return one json result, and if id is 4545 I want to return a different json...</p>
  
  <p>How do I do this?</p>
  
  <p>thanks@!</p>