I have a strange problem I cannot understand. Here is the code calling REST endpoint:
this.http.get<AllApplicationType[]>(environment.SUDS_API_SERVICE_URL + environment.SUDS_ALL_APPLICATIONS_URL, this.setQueryParams(page, size)).toPromise() ...
where setQueryParams function look like this:
setQueryParams(page?: number, size?: number): {} {
const startFrom = page * size + 1;
const params = new HttpParams();
params.set('startFrom', startFrom.toString());
params.set('maxRecords', size.toString());
return params;
}
When the request comes to my backend query params are null, somehow they are not being passed over but why ? Is this not the right method or what ?