title: Postman mock server for requests with dynamic request headers/body
body: <p>I am using Postman mock server to create a mock endpoint where I need the response of the request to contain the request parameter as well as few other key values. </p>
  
  <p>For example if my endpoint is /test?id=123 then i need the response as </p>
  
  <pre><code>    {
          "id":"123",
          "name":"anyRandomName"
      } 
  </code></pre>
  
  <p>Similarly, when I hit /test?id=234 then the response should be </p>
  
  <pre><code>{
      "id":"234",
      "name":"anyRandomName2"
  }
  </code></pre>
  
  <p>One way to achieve this is by making 2 endpoints with specific query parameters, in this example <strong>/test?id=123</strong> and <strong>/test?id=234</strong>. 
  But i am looking for a way where i can read the request parameter just like <strong>{{$id}}</strong> or something like this. Postman do provide keywords like <strong>{{$randomAlphaNumeric}}</strong> which returns random strings but this will change in every hit.</p>