how to query params code example
Example 1: js get query param
const queryString = window.location.search;
const parameters = new URLSearchParams(queryString);
const value = parameters.get('key');
Example 2: query parameters
Query Parameter
represented as key value pair right after the ?
https://www.google.com/search?q=iloveyou
usually used to filter the result
GET /api/spartacus/search?gender=Male&nameContains=li
if we have more than one query parameter
& is used to connect them
Also there is a Path Parameter|variable
/api/spartans/{id} /api/spartans/:id
It's used to identify single resource amonth list of resources
in above example
the id is the path parameter to identify single spartan