# Passing query parameter in the restClient call from a fragment

**URL:** <https://discuss.liferay.com/t/passing-query-parameter-in-the-restclient-call-from-a-fragment/751>\
**Category:** General\
**Tags:** fragments\
**Created:** [June 24, 2026, 6:52pm UTC](https://discuss.liferay.com/t/passing-query-parameter-in-the-restclient-call-from-a-fragment/751 "2026-06-24T18:52:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![granjodh](https://avatars.discourse-cdn.com/v4/letter/g/a6a055/32.png) [@granjodh](https://discuss.liferay.com/u/granjodh)\
**Post date:** [June 24, 2026, 6:52pm UTC](https://discuss.liferay.com/t/passing-query-parameter-in-the-restclient-call-from-a-fragment/751/1 "2026-06-24T18:52:15Z")

</div>

Hi All

We are using restClient to get some object entries in a fragment with below code -

[#assign countriesApiUrl = “/c/countries?page=1&pageSize=40”]   
[#assign countriesResponse = restClient.get(countriesApiUrl)]

We have observed that its just returning the first 20 results, and not taking any of query parameters into consideration. its behaving as if only /c/countries is called.

Is it expected behaviour or its an issue? We are using Liferay 2025.Q1.19.

Thanks
