title: How to pass list of parameters in rest get call (like filter object in eCommerce )
body: <p>In my application, there is a requirement of getting data based on some parameters. 
  I just want to what is the better way to do.</p>
  
  <p>The one way is, I can pass the list of parameters as a path variable.</p>
  
  <p>The second way is, I can pass the request body, I think it is vague and I am not sure it is possible or not.</p>
  
  <p>You can find the code below:</p>
  
  <pre><code>@GetMapping("/cities/{cityName}/latitude/{latitude}/longitude/{longitude}/cityId/{cityId}/street/{street}")
        public ResponseEntity&lt;ResponseContainer&lt;CityDto&gt;&gt; getCityByCityNameOrLatitudeAndLongitude() {
  }
  </code></pre>
  
  <p>I just want to know how can I achieve the same.</p>
  
  <p>There is one more question, E-commerce companies have big filter criteria so how they are achieving.</p>