I'm facing a perplexing issue that I just can’t seem to figure out. Below is the code snippet making a call to a REST endpoint:
this.http.get<AllApplicationType[]>(environment.SUDS_API_SERVICE_URL + environment.SUDS_ALL_APPLICATIONS_URL, this.setQueryParams(page, size)).toPromise() ...
The setQueryParams function has the following structure:
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;
}
Upon backend request execution, the query parameters appear to be null. It’s puzzling why they are not being transferred over. Could it be an incorrect methodology, or is there another reason for this abnormal behavior?