REST Assured adds URL parameters via .pathParam()/path templates for path variables and .queryParam() for query-string values, keeping URLs clean and reusable.
Path parameters fill placeholders in the endpoint: .pathParam('id', 5).get('/users/{id}') or inline .get('/users/{id}', 5), producing /users/5. Query parameters append to the query string: .queryParam('page', 2).queryParam('size', 20).get('/users') produces /users?page=2&size=20. There are also .formParam() for form-encoded bodies and .queryParams(Map) for many at once. Using parameter methods (rather than string-concatenating the URL) handles encoding correctly and keeps tests readable and data-driven — you can parameterize the values from a TestNG DataProvider.
A search test: given().queryParam('q', 'login test').queryParam('limit', 5).when().get('/search') — REST Assured URL-encodes the space in 'login test' automatically.
A tester builds the URL as '/search?q=' + userInput and gets failures when the input has spaces or &. What's the fix?