Hi I'm new to angular hence got stuck at one place. I need to pass array as parameters to backend API backend API expects array of string as parameters
const params = new HttpParams();
const depKey = ['deploymentInprogress', 'deploymentMessage'];
params.append('depKey', JSON.stringify(depKey));
this.http.get(uri, { params: params })
.pipe(
take(1),
catchError((error) => {
return throwError(error);
})
).subscribe(data => {
})
The above code didn't work Need an help on this I'm not sure how we can pass array of strings as params to our backend API
POSTmethod to receive complex values such as objects/arrays.GETmethod for API only supports simple value via the query string, and query params.